diff --git a/template/app/src/demo-ai-app/operations.ts b/template/app/src/demo-ai-app/operations.ts index e07f80c..46c41d8 100644 --- a/template/app/src/demo-ai-app/operations.ts +++ b/template/app/src/demo-ai-app/operations.ts @@ -23,7 +23,6 @@ function setupOpenAI() { } //#region Actions - const generateGptResponseInputSchema = z.object({ hours: z.string().regex(/^\d+(\.\d+)?$/, 'Hours must be a number'), }); @@ -233,6 +232,9 @@ export const updateTask: UpdateTask = async (rawArgs, con const task = await context.entities.Task.update({ where: { id, + user: { + id: context.user.id, + }, }, data: { isDone, @@ -259,6 +261,9 @@ export const deleteTask: DeleteTask = async (rawArgs, con const task = await context.entities.Task.delete({ where: { id, + user: { + id: context.user.id, + }, }, });