From 9176fe779ea9e95e3b56215358dc5a7682e7d3f8 Mon Sep 17 00:00:00 2001 From: Mhd Zayd Skaff Date: Thu, 19 Jun 2025 11:10:57 +0300 Subject: [PATCH] task: add orderBy clause to communities --- src/community/services/community.service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/community/services/community.service.ts b/src/community/services/community.service.ts index fc33011..796e224 100644 --- a/src/community/services/community.service.ts +++ b/src/community/services/community.service.ts @@ -111,6 +111,7 @@ export class CommunityService { .leftJoin('c.spaces', 's', 's.disabled = false') .where('c.project = :projectUuid', { projectUuid }) .andWhere(`c.name != '${ORPHAN_COMMUNITY_NAME}-${project.name}'`) + .orderBy('c.createdAt', 'DESC') .distinct(true); if (pageable.search) { qb.andWhere(