Add documentation and correct typo

This commit is contained in:
2019-08-01 22:31:44 +02:00
parent 31bbcb52c7
commit 0c70ee8771
5 changed files with 262 additions and 42 deletions

View File

@@ -19,12 +19,12 @@ router.put('/:id', async (req, res) => {
res.status(404).json({ message: 'The user could not be found' });
}
})
.catch(err => res.status(500).json({ message: 'Error updating the user' }));
.catch(() => res.status(500).json({ message: 'Error updating the user' }));
});
router.delete("/:id", (req, res) => {
Users.removeUser(req.params.id)
.then(data => res.status(200).json(data))
.then(() => res.status(200).json({ message: 'The user was successfully deleted.'}))
.catch(err => res.json(err));
});