mirror of
https://github.com/immich-app/immich.git
synced 2026-03-01 18:19:10 +03:00
fix: album start/end dates on shared links (#21268)
This commit is contained in:
@@ -86,7 +86,16 @@ export class SharedLinkRepository {
|
||||
(join) => join.onTrue(),
|
||||
)
|
||||
.select((eb) =>
|
||||
eb.fn.coalesce(eb.fn.jsonAgg('assets').filterWhere('assets.id', 'is not', null), sql`'[]'`).as('assets'),
|
||||
eb.fn
|
||||
.coalesce(
|
||||
eb.fn
|
||||
.jsonAgg('assets')
|
||||
.orderBy('assets.fileCreatedAt', 'asc')
|
||||
.filterWhere('assets.id', 'is not', null),
|
||||
|
||||
sql`'[]'`,
|
||||
)
|
||||
.as('assets'),
|
||||
)
|
||||
.select((eb) => eb.fn.toJson('owner').as('owner'))
|
||||
.groupBy(['album.id', sql`"owner".*`])
|
||||
|
||||
Reference in New Issue
Block a user