mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
fix(api): always return the page total when listing reports (#2534)
This commit is contained in:
1 parent
d2438b2fdd
commit
8f4fa82a9e
4 files changed
+22
-28
No files matched your search
@@ -74,7 +74,7 @@ export class AdminReportService {
|
||||
const {reportService} = this.deps;
|
||||
const requestedLimit = limit || 50;
|
||||
const currentOffset = offset || 0;
|
||||
const reports = await reportService.listReportsByStatus(status, requestedLimit, currentOffset);
|
||||
const {reports, total} = await reportService.listReportsByStatus(status, requestedLimit, currentOffset);
|
||||
const requestCache = createRequestCache();
|
||||
const reportNsfwLookupCache = createReportNsfwLookupCache();
|
||||
const reportResponses = await Promise.all(
|
||||
@@ -84,6 +84,9 @@ export class AdminReportService {
|
||||
);
|
||||
return {
|
||||
reports: reportResponses,
|
||||
total,
|
||||
offset: currentOffset,
|
||||
limit: requestedLimit,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user