wasp/examples/tutorials/TodoApp/ext/actions.js

15 lines
319 B
JavaScript
Raw Normal View History

2020-10-12 16:03:07 +03:00
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 },
2020-10-12 23:07:36 +03:00
data: {
isDone: args.data.isDone
}
2020-10-12 16:03:07 +03:00
})
}