Map results with total_results before returing. TODO this should be mapped with all wanted list return vars

This commit is contained in:
2019-06-04 23:54:39 +02:00
parent b9dec2344e
commit 1a1a7328a3

View File

@@ -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}))
}
}