Compare commits
1 commit
4806feadeb
...
c23e5ac85a
Author | SHA1 | Date | |
---|---|---|---|
c23e5ac85a |
1 changed files with 2 additions and 17 deletions
|
@ -1,25 +1,10 @@
|
|||
import { toggleTaken } from '../../../controller'
|
||||
import { useBody } from 'h3'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
try {
|
||||
const body = await useBody(event)
|
||||
const taken = toggleTaken(event.context.params.uuid)
|
||||
return { success: true, taken }
|
||||
toggleTaken(event.context.params.uuid)
|
||||
return { success: true }
|
||||
} catch (e) {
|
||||
return { success: false, reason: e.message }
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// import { setTaken } from '../../controller'
|
||||
//
|
||||
// export default defineEventHandler(async (event) => {
|
||||
// try {
|
||||
// const body = await useBody(event)
|
||||
// const taken = setTaken(event.context.params.uuid)
|
||||
// return { success: true, taken }
|
||||
// } catch (e) {
|
||||
// return { success: false, reason: e.message }
|
||||
// }
|
||||
// })
|
||||
|
|
Loading…
Reference in a new issue