diff --git a/seasoned_api/src/request/request.js b/seasoned_api/src/request/request.js index 376087a..64d4205 100644 --- a/seasoned_api/src/request/request.js +++ b/seasoned_api/src/request/request.js @@ -111,6 +111,7 @@ class RequestRepository { .then(() => this.sortAndFilterToDbQuery(sort_by, sort_direction, filter_param, query)) .then((dbQuery) => this.database.all(dbQuery)) .then((rows) => Promise.all(this.mapToTmdbByType(rows))) + .then(result => Promise.resolve({results: result, total_results: result.length})) } }