From c354db4e82632a5bc9fff8f9d0fe3bd1759b838e Mon Sep 17 00:00:00 2001 From: Navaneethakrishnan Date: Fri, 2 Aug 2024 14:37:48 +0530 Subject: [PATCH] feat: introduced ordering the focus area by created at --- apps/web-api/src/focus-areas/focus-areas.service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/web-api/src/focus-areas/focus-areas.service.ts b/apps/web-api/src/focus-areas/focus-areas.service.ts index 890850efb..0337f0732 100644 --- a/apps/web-api/src/focus-areas/focus-areas.service.ts +++ b/apps/web-api/src/focus-areas/focus-areas.service.ts @@ -24,6 +24,9 @@ export class FocusAreasService { include: { children: true, ...this.buildAncestorFocusAreasFilterByType(type, query) + }, + orderBy: { + createdAt: "desc" } }; } @@ -31,6 +34,9 @@ export class FocusAreasService { include: { children: this.buildQueryByLevel(level - 1, type, query), ...this.buildAncestorFocusAreasFilterByType(type, query) + }, + orderBy: { + createdAt: "desc" } }; }