diff --git a/CommonServer/API/StatusPageAPI.ts b/CommonServer/API/StatusPageAPI.ts index 0eb7dececd..bf10a96f8c 100644 --- a/CommonServer/API/StatusPageAPI.ts +++ b/CommonServer/API/StatusPageAPI.ts @@ -755,7 +755,7 @@ export default class StatusPageAPI extends BaseAPI< } as any, }, sort: { - createdAt: SortOrder.Descending, + createdAt: SortOrder.Ascending, }, skip: 0, limit: LIMIT_INFINITY, // This can be optimized. @@ -764,8 +764,7 @@ export default class StatusPageAPI extends BaseAPI< }, }); - monitorStatusTimelines = - monitorStatusTimelines.reverse(); + monitorStatusTimelines = monitorStatusTimelines.concat( await MonitorStatusTimelineService.findBy({ @@ -786,7 +785,7 @@ export default class StatusPageAPI extends BaseAPI< } as any, }, sort: { - createdAt: SortOrder.Descending, + createdAt: SortOrder.Ascending, }, skip: 0, limit: LIMIT_INFINITY, // This can be optimized. @@ -795,9 +794,6 @@ export default class StatusPageAPI extends BaseAPI< }, }) ); - - monitorStatusTimelines = - monitorStatusTimelines.reverse(); } // check if status page has active incident.