mirror of
https://github.com/kou029w/_.git
synced 2025-01-31 22:38:06 +00:00
14 lines
361 B
TypeScript
14 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 }
|
||
|
}
|
||
|
}))
|