Added type input to the sendRequest function.

This commit is contained in:
2017-09-03 18:16:26 +02:00
parent 2b7f9551bf
commit 9eb31ea433
2 changed files with 10 additions and 5 deletions

View File

@@ -11,8 +11,9 @@ const requestRepository = new RequestRepository();
function submitRequestController(req, res) {
// This is the id that is the param of the url
const id = req.params.mediaId;
const type = req.query.type;
requestRepository.sendRequest(id)
requestRepository.sendRequest(id, type)
.then(() => {
res.send({ success: true, message: 'Media item sucessfully requested!' });
})