Now takes both id and type because there is two different sets of id pools, and need to select the corrent one.

This commit is contained in:
2017-10-06 15:37:09 +02:00
parent 3c372aab92
commit 307a8352a3
2 changed files with 5 additions and 4 deletions

View File

@@ -9,9 +9,10 @@ const requestRepository = new RequestRepository();
*/
function updateRequested(req, res) {
const id = req.params.requestId;
const type = req.body.type;
const status = req.body.status;
requestRepository.updateRequestedById(id, status)
requestRepository.updateRequestedById(id, type, status)
.then(() => {
res.send({ success: true });
})