mirror of
https://github.com/wasp-lang/open-saas.git
synced 2025-06-22 06:40:52 +02:00
Update operations.ts
This commit is contained in:
parent
576d47a32e
commit
48a1d2a1cd
@ -23,7 +23,6 @@ function setupOpenAI() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//#region Actions
|
//#region Actions
|
||||||
|
|
||||||
const generateGptResponseInputSchema = z.object({
|
const generateGptResponseInputSchema = z.object({
|
||||||
hours: z.string().regex(/^\d+(\.\d+)?$/, 'Hours must be a number'),
|
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({
|
const task = await context.entities.Task.update({
|
||||||
where: {
|
where: {
|
||||||
id,
|
id,
|
||||||
|
user: {
|
||||||
|
id: context.user.id,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
isDone,
|
isDone,
|
||||||
@ -259,6 +261,9 @@ export const deleteTask: DeleteTask<DeleteTaskInput, Task> = async (rawArgs, con
|
|||||||
const task = await context.entities.Task.delete({
|
const task = await context.entities.Task.delete({
|
||||||
where: {
|
where: {
|
||||||
id,
|
id,
|
||||||
|
user: {
|
||||||
|
id: context.user.id,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user