Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- exports.create = (req, res) => {
- const user = new User({
- name: req.body.name,
- surname: req.body.surname,
- username: req.body.username,
- password: req.body.password,
- passwordConf: req.body.passwordConf
- });
- user.save()
- .then(data => {
- res.send(data);
- }).catch(err => {
- res.status(500).send({
- message: err.message || "Wystapil jakis blad podczas tworzenia uzytkownika!"
- });
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement