mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +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
8
server/test/fixtures/shared-link.stub.ts
vendored
8
server/test/fixtures/shared-link.stub.ts
vendored
|
|
@ -118,6 +118,7 @@ export const sharedLinkStub = {
|
|||
description: null,
|
||||
assets: [assetStub.image],
|
||||
password: 'password',
|
||||
slug: null,
|
||||
}),
|
||||
valid: Object.freeze({
|
||||
id: '123',
|
||||
|
|
@ -135,6 +136,7 @@ export const sharedLinkStub = {
|
|||
password: null,
|
||||
assets: [] as MapAsset[],
|
||||
album: null,
|
||||
slug: null,
|
||||
}),
|
||||
expired: Object.freeze({
|
||||
id: '123',
|
||||
|
|
@ -152,6 +154,7 @@ export const sharedLinkStub = {
|
|||
albumId: null,
|
||||
assets: [] as MapAsset[],
|
||||
album: null,
|
||||
slug: null,
|
||||
}),
|
||||
readonlyNoExif: Object.freeze({
|
||||
id: '123',
|
||||
|
|
@ -166,6 +169,7 @@ export const sharedLinkStub = {
|
|||
description: null,
|
||||
password: null,
|
||||
assets: [],
|
||||
slug: null,
|
||||
albumId: 'album-123',
|
||||
album: {
|
||||
id: 'album-123',
|
||||
|
|
@ -266,6 +270,7 @@ export const sharedLinkStub = {
|
|||
allowUpload: true,
|
||||
allowDownload: true,
|
||||
showExif: true,
|
||||
slug: null,
|
||||
description: null,
|
||||
password: 'password',
|
||||
assets: [],
|
||||
|
|
@ -288,6 +293,7 @@ export const sharedLinkResponseStub = {
|
|||
showMetadata: true,
|
||||
type: SharedLinkType.Album,
|
||||
userId: 'admin_id',
|
||||
slug: null,
|
||||
}),
|
||||
expired: Object.freeze<SharedLinkResponseDto>({
|
||||
album: undefined,
|
||||
|
|
@ -303,6 +309,7 @@ export const sharedLinkResponseStub = {
|
|||
showMetadata: true,
|
||||
type: SharedLinkType.Album,
|
||||
userId: 'admin_id',
|
||||
slug: null,
|
||||
}),
|
||||
readonlyNoMetadata: Object.freeze<SharedLinkResponseDto>({
|
||||
id: '123',
|
||||
|
|
@ -316,6 +323,7 @@ export const sharedLinkResponseStub = {
|
|||
allowUpload: false,
|
||||
allowDownload: false,
|
||||
showMetadata: false,
|
||||
slug: null,
|
||||
album: { ...albumResponse, startDate: assetResponse.localDateTime, endDate: assetResponse.localDateTime },
|
||||
assets: [{ ...assetResponseWithoutMetadata, exifInfo: undefined }],
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue