Skip to content
This repository has been archived by the owner on Apr 24, 2021. It is now read-only.

Update examples to use this.request.body from koa-better-body #5

Open
cat2608 opened this issue May 24, 2016 · 1 comment
Open

Update examples to use this.request.body from koa-better-body #5

cat2608 opened this issue May 24, 2016 · 1 comment

Comments

@cat2608
Copy link

cat2608 commented May 24, 2016

Using koa-better-body we must to add the option 'fields': 'body'due koa-validation requires this.request.body instead this.body:

app.use(koaBody({
    'multipart': true,
    'fields': 'body',
}));

https://github.com/srinivasiyer/koa-validation/blob/master/lib/validate.js#L17

@srinivasiyer
Copy link
Owner

Hi Catalina,

Thanks for pointing the issue. It was an oversight from my end. I shall try and come up with a fix in a couple of days.

Appreciate the help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants