mirror of
https://github.com/Art051/immich.git
synced 2025-08-11 19:29:00 +00:00
refactor(server): api keys (#1339)
* refactor: api keys * refactor: test module * chore: tests * chore: fix provider * refactor: test mock repos
This commit is contained in:
8
server/libs/domain/src/api-key/dto/api-key-create.dto.ts
Normal file
8
server/libs/domain/src/api-key/dto/api-key-create.dto.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import { IsNotEmpty, IsOptional, IsString } from 'class-validator';
|
||||
|
||||
export class APIKeyCreateDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@IsOptional()
|
||||
name?: string;
|
||||
}
|
||||
7
server/libs/domain/src/api-key/dto/api-key-update.dto.ts
Normal file
7
server/libs/domain/src/api-key/dto/api-key-update.dto.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
|
||||
export class APIKeyUpdateDto {
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
name!: string;
|
||||
}
|
||||
2
server/libs/domain/src/api-key/dto/index.ts
Normal file
2
server/libs/domain/src/api-key/dto/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './api-key-create.dto';
|
||||
export * from './api-key-update.dto';
|
||||
Reference in New Issue
Block a user