From 6973e8b1954493a9ba382eeb2c64cffa69c9c24b Mon Sep 17 00:00:00 2001 From: ZaydSkaff Date: Thu, 19 Jun 2025 11:13:24 +0300 Subject: [PATCH] task: sort communities by creation date (#416) --- 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(