mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: shared links custom URL (#19999)
* feat: custom url for shared links * feat: use a separate route and query param --------- Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
parent
16b14b390f
commit
9b3718120b
65 changed files with 947 additions and 432 deletions
|
|
@ -188,9 +188,47 @@ from
|
|||
"shared_link"
|
||||
left join "album" on "album"."id" = "shared_link"."albumId"
|
||||
where
|
||||
"shared_link"."key" = $1
|
||||
and "album"."deletedAt" is null
|
||||
"album"."deletedAt" is null
|
||||
and (
|
||||
"shared_link"."type" = $2
|
||||
"shared_link"."type" = $1
|
||||
or "album"."id" is not null
|
||||
)
|
||||
and "shared_link"."key" = $2
|
||||
|
||||
-- SharedLinkRepository.getBySlug
|
||||
select
|
||||
"shared_link"."id",
|
||||
"shared_link"."userId",
|
||||
"shared_link"."expiresAt",
|
||||
"shared_link"."showExif",
|
||||
"shared_link"."allowUpload",
|
||||
"shared_link"."allowDownload",
|
||||
"shared_link"."password",
|
||||
(
|
||||
select
|
||||
to_json(obj)
|
||||
from
|
||||
(
|
||||
select
|
||||
"user"."id",
|
||||
"user"."name",
|
||||
"user"."email",
|
||||
"user"."isAdmin",
|
||||
"user"."quotaUsageInBytes",
|
||||
"user"."quotaSizeInBytes"
|
||||
from
|
||||
"user"
|
||||
where
|
||||
"user"."id" = "shared_link"."userId"
|
||||
) as obj
|
||||
) as "user"
|
||||
from
|
||||
"shared_link"
|
||||
left join "album" on "album"."id" = "shared_link"."albumId"
|
||||
where
|
||||
"album"."deletedAt" is null
|
||||
and (
|
||||
"shared_link"."type" = $1
|
||||
or "album"."id" is not null
|
||||
)
|
||||
and "shared_link"."slug" = $2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue