task: sort communities by creation date (#416)

This commit is contained in:
ZaydSkaff
2025-06-19 11:13:24 +03:00
committed by GitHub
parent 92d102d08f
commit 6973e8b195

View File

@ -111,6 +111,7 @@ export class CommunityService {
.leftJoin('c.spaces', 's', 's.disabled = false') .leftJoin('c.spaces', 's', 's.disabled = false')
.where('c.project = :projectUuid', { projectUuid }) .where('c.project = :projectUuid', { projectUuid })
.andWhere(`c.name != '${ORPHAN_COMMUNITY_NAME}-${project.name}'`) .andWhere(`c.name != '${ORPHAN_COMMUNITY_NAME}-${project.name}'`)
.orderBy('c.createdAt', 'DESC')
.distinct(true); .distinct(true);
if (pageable.search) { if (pageable.search) {
qb.andWhere( qb.andWhere(