Compare commits

..

1 commit

Author SHA1 Message Date
c23e5ac85a aggiunto segnapreso senza auth 2022-08-29 17:27:00 +02:00

View file

@ -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 }
// }
// })