mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
* custom `IsOptional` * added link to source * formatting * Update server/src/domain/domain.util.ts Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> * nullable birth date endpoint * made `nullable` a property * formatting * removed unused dto * updated decorator arg * fixed album e2e tests * add null tests for auth e2e * add null test for person e2e * fixed tests * added null test for user e2e * removed unusued import * log key in test name * chore: add note about mobile not being able to use the endpoint --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
26 lines
473 B
TypeScript
26 lines
473 B
TypeScript
import { IsNotEmpty, IsString } from 'class-validator';
|
|
import { Optional } from '../domain.util';
|
|
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;
|
|
}
|