wasp/examples/tutorials/TodoApp/ext/actions.js
2020-10-12 15:16:48 +02:00

13 lines
290 B
JavaScript

export const createTask = async ({ description }, context) => {
return context.entities.Task.create({
data: { description }
})
}
export const updateTask = async (args, context) => {
return context.entities.Task.update({
where: { id: args.taskId },
data: args.data
})
}