How to use the username function from koa-body

Find comprehensive JavaScript koa-body.username code examples handpicked from public code repositorys.

59
60
61
62
63
64
65
66
67
68
69
});


router.post('/api/update', body(), async (ctx) => {
    const body = ctx.request.body;
    const eid = body.eid;
    const username = body.username;
    const ck = body.ck;
    ctx.body = await new User({eid, ck, username}).update();
});

fork icon11
star icon15
watch icon0

+ 2 other calls in file