fix(api): always return the page total when listing reports (#2534)

This commit is contained in:
Hampus authored and GitHub committed 2026-09-06 17:38:21 +02:00
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,
};
}