mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
parent
0c13c63bb6
commit
6d9e7694b1
145 changed files with 917 additions and 964 deletions
26
server/src/dtos/api-key.dto.ts
Normal file
26
server/src/dtos/api-key.dto.ts
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
import { Optional } from 'src/validation';
|
||||
export class APIKeyCreateDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@Optional()
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export class APIKeyUpdateDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
name!: string;
|
||||
}
|
||||
|
||||
export class APIKeyCreateResponseDto {
|
||||
secret!: string;
|
||||
apiKey!: APIKeyResponseDto;
|
||||
}
|
||||
|
||||
export class APIKeyResponseDto {
|
||||
id!: string;
|
||||
name!: string;
|
||||
createdAt!: Date;
|
||||
updatedAt!: Date;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue