1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-26 10:50:29 +02:00
immich/server/test
Michael Manganiello b6f18cbe81
fix(server): Correctly set album start and end dates (#4698)
* fix(server): Correctly set album start and end dates

Currently, the query that retrieves album assets uses
`ORDER BY assets.fileCreatedAt DESC`, which makes the existing logic
return the start/end dates reversed (with `startDate` being taken from
the first asset in the array).

Instead of using the index-based approach, this change iterates through
assets to get the min/max `fileCreatedAt`. This will avoid any future
issues, if the query ordering changes, or becomes customizable (e.g. in
case the user prefers to visualize older assets first).

* fix: Maintain constant cost and only swap variables if needed
2023-10-31 05:08:34 -05:00
..
api fix(server,web): correctly remove metadata from shared links (#4464) 2023-10-14 01:46:30 +00:00
assets@948f353e3c fix(server,web): correctly remove metadata from shared links (#4464) 2023-10-14 01:46:30 +00:00
db chore(server): Improve test coverage! (#3889) 2023-09-11 11:56:38 -04:00
e2e chore(server): remove user count endpoint (#4724) 2023-10-30 19:29:18 +00:00
fixtures fix(server): Correctly set album start and end dates (#4698) 2023-10-31 05:08:34 -05:00
repositories refactor(server): auth delete device (#4720) 2023-10-30 11:48:38 -04:00
global-setup.js refactor(server)*: tsconfigs (#2689) 2023-06-08 10:01:07 -05:00
index.ts chore(server): organize imports (#2779) 2023-06-16 19:54:17 +00:00
setup.ts refactor(server)*: tsconfigs (#2689) 2023-06-08 10:01:07 -05:00
test-utils.ts refactor: e2e tests (#4536) 2023-10-18 17:02:42 -05:00