mirror of
https://github.com/kou029w/_.git
synced 2025-01-31 14:28:04 +00:00
13 lines
361 B
TypeScript
13 lines
361 B
TypeScript
import { defineController } from './$relay'
|
|
import { updateTask, deleteTask } from '$/service/tasks'
|
|
|
|
export default defineController(() => ({
|
|
patch: async ({ body, params }) => {
|
|
await updateTask(params.taskId, body)
|
|
return { status: 204 }
|
|
},
|
|
delete: async ({ params }) => {
|
|
await deleteTask(params.taskId)
|
|
return { status: 204 }
|
|
}
|
|
}))
|