Update operations.ts (#402)

This commit is contained in:
vincanger 2025-03-31 17:58:17 +02:00 committed by GitHub
parent 576d47a32e
commit 02ac3c6977
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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<UpdateTaskInput, Task> = 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<DeleteTaskInput, Task> = async (rawArgs, con
const task = await context.entities.Task.delete({
where: {
id,
user: {
id: context.user.id,
},
},
});