Sort user teams by main team first, then alphabetically

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kalle 2026-02-24 20:02:41 +02:00
parent 9e0f36d90c
commit 2c1a833b6e

View File

@ -52,6 +52,8 @@ export function findAllMemberOfByUserId(userId: number) {
),
])
.where("TeamMemberWithSecondary.userId", "=", userId)
.orderBy("TeamMemberWithSecondary.isMainTeam", "desc")
.orderBy("Team.name", "asc")
.execute();
}