mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-12-29 05:01:17 +00:00
refactor(server): shared links (#1385)
* refactor(server): shared links * chore: tests * fix: bugs and tests * fix: missed one expired at * fix: standardize file upload checks * test: lower flutter version Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
12
server/libs/domain/src/share/dto/create-shared-link.dto.ts
Normal file
12
server/libs/domain/src/share/dto/create-shared-link.dto.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { AlbumEntity, AssetEntity, SharedLinkType } from '@app/infra/db/entities';
|
||||
|
||||
export class CreateSharedLinkDto {
|
||||
description?: string;
|
||||
expiresAt?: string;
|
||||
type!: SharedLinkType;
|
||||
assets!: AssetEntity[];
|
||||
album?: AlbumEntity;
|
||||
allowUpload?: boolean;
|
||||
allowDownload?: boolean;
|
||||
showExif?: boolean;
|
||||
}
|
||||
18
server/libs/domain/src/share/dto/edit-shared-link.dto.ts
Normal file
18
server/libs/domain/src/share/dto/edit-shared-link.dto.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { IsOptional } from 'class-validator';
|
||||
|
||||
export class EditSharedLinkDto {
|
||||
@IsOptional()
|
||||
description?: string;
|
||||
|
||||
@IsOptional()
|
||||
expiresAt?: string | null;
|
||||
|
||||
@IsOptional()
|
||||
allowUpload?: boolean;
|
||||
|
||||
@IsOptional()
|
||||
allowDownload?: boolean;
|
||||
|
||||
@IsOptional()
|
||||
showExif?: boolean;
|
||||
}
|
||||
2
server/libs/domain/src/share/dto/index.ts
Normal file
2
server/libs/domain/src/share/dto/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './create-shared-link.dto';
|
||||
export * from './edit-shared-link.dto';
|
||||
Reference in New Issue
Block a user