mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-01-19 15:46:37 +00:00
refactor(server): person dto (#3058)
This commit is contained in:
@@ -1 +0,0 @@
|
||||
export * from './person-update.dto';
|
||||
@@ -1,7 +0,0 @@
|
||||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
|
||||
export class PersonUpdateDto {
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
name!: string;
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
export * from './dto';
|
||||
export * from './person.dto';
|
||||
export * from './person.repository';
|
||||
export * from './person.service';
|
||||
export * from './response-dto';
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
import { AssetFaceEntity, PersonEntity } from '@app/infra/entities';
|
||||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
|
||||
export class PersonUpdateDto {
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
name!: string;
|
||||
}
|
||||
|
||||
export class PersonResponseDto {
|
||||
id!: string;
|
||||
@@ -9,9 +9,9 @@ import {
|
||||
} from '@test';
|
||||
import { IJobRepository, JobName } from '..';
|
||||
import { IStorageRepository } from '../storage';
|
||||
import { PersonResponseDto } from './person.dto';
|
||||
import { IPersonRepository } from './person.repository';
|
||||
import { PersonService } from './person.service';
|
||||
import { PersonResponseDto } from './response-dto';
|
||||
|
||||
const responseDto: PersonResponseDto = {
|
||||
id: 'person-1',
|
||||
|
||||
@@ -3,9 +3,8 @@ import { AssetResponseDto, mapAsset } from '../asset';
|
||||
import { AuthUserDto } from '../auth';
|
||||
import { IJobRepository, JobName } from '../job';
|
||||
import { ImmichReadStream, IStorageRepository } from '../storage';
|
||||
import { PersonUpdateDto } from './dto';
|
||||
import { mapPerson, PersonResponseDto, PersonUpdateDto } from './person.dto';
|
||||
import { IPersonRepository } from './person.repository';
|
||||
import { mapPerson, PersonResponseDto } from './response-dto';
|
||||
|
||||
@Injectable()
|
||||
export class PersonService {
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export * from './person-response.dto';
|
||||
Reference in New Issue
Block a user