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:
Jed-Giblin 2025-07-28 14:16:55 -04:00 committed by GitHub
parent 16b14b390f
commit 9b3718120b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
65 changed files with 947 additions and 432 deletions

View file

@ -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