Skip to content

Commit

Permalink
fix: X years ago ordering (#13742)
Browse files Browse the repository at this point in the history
* fix: order by fileCreatedAt to account for tz

* run make sql
  • Loading branch information
darrelhong authored Oct 26, 2024
1 parent 88d85ef commit a70ed7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/src/queries/asset.repository.sql
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ WHERE
)
AND ("entity"."deletedAt" IS NULL)
ORDER BY
"entity"."localDateTime" ASC
"entity"."fileCreatedAt" ASC

-- AssetRepository.getByIds
SELECT
Expand Down
2 changes: 1 addition & 1 deletion server/src/repositories/asset.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class AssetRepository implements IAssetRepository {
)
.leftJoinAndSelect('entity.exifInfo', 'exifInfo')
.leftJoinAndSelect('entity.files', 'files')
.orderBy('entity.localDateTime', 'ASC')
.orderBy('entity.fileCreatedAt', 'ASC')
.getMany();
}

Expand Down

0 comments on commit a70ed7c

Please sign in to comment.