fix(requests): move total count to up

This commit is contained in:
Mauricio Siu 2024-09-07 13:13:55 -06:00
parent 685a825881
commit 9766e590b0

View File

@ -78,6 +78,7 @@ export function parseRawConfig(
status.some((range) => isStatusInRange(log.DownstreamStatus, range)),
);
}
const totalCount = parsedLogs.length;
if (sort) {
parsedLogs = _.orderBy(
@ -94,8 +95,6 @@ export function parseRawConfig(
parsedLogs = parsedLogs.slice(startIndex, startIndex + page.pageSize);
}
const totalCount = parsedLogs.length;
return { data: parsedLogs, totalCount };
} catch (error) {
console.error("Error parsing rawConfig:", error);