Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix body parser #338

Merged
merged 1 commit into from
Sep 13, 2016
Merged

fix body parser #338

merged 1 commit into from
Sep 13, 2016

Conversation

aegyed91
Copy link
Contributor

@aegyed91 aegyed91 commented Aug 3, 2016

This doesn't work.

server.use(function (req, res, next) {
  if (req.method === 'POST') {
    req.body.createdAt = Date.now()
  }
  // Continue to JSON Server router
  next()
})

The PR fixes is.

@typicode

@typicode
Copy link
Owner

Thank you 👍

@typicode typicode merged commit 26cda0d into typicode:master Sep 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants