Moved, renamed, re-did and added a lot of stuff. Getting ready for the v2 upgrade

This commit is contained in:
2019-11-03 20:33:30 +01:00
parent 879a02b388
commit b802a7b62b
33 changed files with 576 additions and 727 deletions

View File

@@ -11,10 +11,9 @@ function fetchAllRequests(req, res) {
const id = req.params.id;
const { type } = req.query;
Promise.resolve()
.then(() => request.getRequestByIdAndType(id, type))
.then((result) => res.send(result))
.catch((error) => {
request.getRequestByIdAndType(id, type)
.then(result => res.send(result))
.catch(error => {
res.status(404).send({ success: false, error: error.message });
});
}