imPaul
imPaul
DDeno
Created by bAILEY on 10/25/2024 in #help
Basic CRUD API
router.post("/register", async (ctx) => {

const body = ctx.request.body({type: 'json'})
const value = await body.value
console.log(value)

// const username = user.value.get('username')
// console.log(user.get('username'))
})
router.post("/register", async (ctx) => {

const body = ctx.request.body({type: 'json'})
const value = await body.value
console.log(value)

// const username = user.value.get('username')
// console.log(user.get('username'))
})
I think you don't have to await the request's body.
5 replies