Skip to content

Commit 5023dd1

Browse files
committed
- fix: update ordering in pot room queries to use startsAt instead of createdAt
1 parent 45621b3 commit 5023dd1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/database/repository/pot-room.repository.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class PotRoomRepository {
5858
AND pr.ends_at >= ?2 // optional
5959
AND pr.starts_at <= ?3 // optional
6060
GROUP BY pr.pk // for count()
61-
ORDER BY pr.created_at ASC
61+
ORDER BY pr.starts_at ASC
6262
OFFSET ?4 LIMIT ?5;
6363
*/
6464
async searchPotList(
@@ -89,7 +89,7 @@ export class PotRoomRepository {
8989
.groupBy(potRoom.pk)
9090
.offset(offset * limit)
9191
.limit(limit)
92-
.orderBy(asc(potRoom.createdAt));
92+
.orderBy(asc(potRoom.startsAt));
9393

9494
return results.map((result) => this.resultToPotRoomEntity(result));
9595
}

0 commit comments

Comments
 (0)