mirror of
https://github.com/wasp-lang/open-saas.git
synced 2025-04-10 21:09:04 +02:00
Update operations.ts (#402)
This commit is contained in:
parent
576d47a32e
commit
02ac3c6977
@ -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,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user