{"size": 327, "ext": "js", "max_stars_repo_path": "server/controllers/user.js", "max_stars_repo_name": "pmuldoon86/makersbnb", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "server/controllers/user.js", "max_issues_repo_name": "pmuldoon86/makersbnb", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "server/controllers/user.js", "max_forks_repo_name": "pmuldoon86/makersbnb", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 20.4375, "max_line_length": 51, "alphanum_fraction": 0.5259938838}
const User = require('../models').User;

module.exports = {
  create(req, res) {
    return User
      .create({
        email: req.body.email,
        password: req.body.password,
      })
      .then(user => {
        return res.status(200).redirect('/');
      })
      .catch(error => res.status(400).send(error));
  },
};
