Mapped results in tmdb now returns the complete json object so not needed to be created before sent. When getting all requested movies and shows it is now possible to only get one page at a time.
This commit is contained in:
@@ -10,9 +10,9 @@ const requestRepository = new RequestRepository();
|
||||
*/
|
||||
function fetchRequestedController(req, res) {
|
||||
// const user = req.loggedInUser;
|
||||
const { status } = req.query;
|
||||
const { status, page } = req.query;
|
||||
|
||||
requestRepository.fetchRequested(status)
|
||||
requestRepository.fetchRequested(status, page)
|
||||
.then((requestedItems) => {
|
||||
res.send({ success: true, results: requestedItems, total_results: requestedItems.length });
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user