mirror of
https://github.com/immich-app/immich.git
synced 2025-12-18 09:13:15 +03:00
fix(server): for individual shares not showing thumbnails (#15895)
* Fix for individual shares not showing thumbnails * synced sql * chore: add e2e test --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
@@ -100,13 +100,14 @@ order by
|
||||
-- SharedLinkRepository.getAll
|
||||
select distinct
|
||||
on ("shared_links"."createdAt") "shared_links".*,
|
||||
to_json("assets") as "assets",
|
||||
to_json("album") as "album"
|
||||
from
|
||||
"shared_links"
|
||||
left join "shared_link__asset" on "shared_link__asset"."sharedLinksId" = "shared_links"."id"
|
||||
left join lateral (
|
||||
select
|
||||
"assets".*
|
||||
json_agg("assets") as "assets"
|
||||
from
|
||||
"assets"
|
||||
where
|
||||
|
||||
@@ -103,12 +103,13 @@ export class SharedLinkRepository implements ISharedLinkRepository {
|
||||
(eb) =>
|
||||
eb
|
||||
.selectFrom('assets')
|
||||
.select((eb) => eb.fn.jsonAgg('assets').as('assets'))
|
||||
.whereRef('assets.id', '=', 'shared_link__asset.assetsId')
|
||||
.where('assets.deletedAt', 'is', null)
|
||||
.selectAll('assets')
|
||||
.as('assets'),
|
||||
(join) => join.onTrue(),
|
||||
)
|
||||
.select((eb) => eb.fn.toJson('assets').as('assets'))
|
||||
.leftJoinLateral(
|
||||
(eb) =>
|
||||
eb
|
||||
|
||||
Reference in New Issue
Block a user