[go: nahoru, domu]

Skip to content

Commit

Permalink
fix(server): /places entries sometimes not ordered alphabetically (i…
Browse files Browse the repository at this point in the history
  • Loading branch information
mertalev committed Jun 21, 2024
1 parent 5e9a7b1 commit 42f3b50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions server/src/queries/search.repository.sql
Original file line number Diff line number Diff line change
Expand Up @@ -405,3 +405,5 @@ FROM
"assets" "asset"
INNER JOIN "exif" "exif" ON "exif"."assetId" = "asset"."id"
INNER JOIN cte ON asset.id = cte."assetId"
ORDER BY
exif.city
2 changes: 1 addition & 1 deletion server/src/repositories/search.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class SearchRepository implements ISearchRepository {
.innerJoinAndSelect('asset.exifInfo', 'exif')
.withDeleted()
.getQuery() +
' INNER JOIN cte ON asset.id = cte."assetId"';
' INNER JOIN cte ON asset.id = cte."assetId" ORDER BY exif.city';
}

async init(modelName: string): Promise<void> {
Expand Down

0 comments on commit 42f3b50

Please sign in to comment.