Adding request works (mostly)
Everything works except adding the new request back to the list; this proof of concept is a go, and will be merged to master
This commit is contained in:
@@ -8,8 +8,7 @@ const router = new Router()
|
||||
export default function (checkJwt) {
|
||||
|
||||
router.post('/', checkJwt, async (ctx, next) => {
|
||||
const newId = await db.request.addNew(ctx.state.user.sub, ctx.body.requestText)
|
||||
ctx.body = { id: newId }
|
||||
ctx.body = await db.request.addNew(ctx.state.user.sub, ctx.request.body.requestText)
|
||||
await next()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user