fix: update the DTOs types naming

This commit is contained in:
yassinedorbozgithub
2025-01-10 08:32:40 +01:00
parent 13e94e5079
commit 5c4d9af9cf
8 changed files with 24 additions and 16 deletions

View File

@@ -71,7 +71,7 @@ export abstract class BaseRepository<
T extends FlattenMaps<unknown>,
P extends string = never,
TFull extends Omit<T, P> = never,
DTO extends DtoProps<T> = unknown,
DTOCruds extends DtoProps<T> = unknown,
U = Omit<T, keyof BaseSchema>,
D = Document<T>,
> {
@@ -456,7 +456,7 @@ export abstract class BaseRepository<
return await this.model.countDocuments(criteria).exec();
}
async create(dto: DtoInfer<DtoOperations.Create, DTO, U>): Promise<T> {
async create(dto: DtoInfer<DtoOperations.Create, DTOCruds, U>): Promise<T> {
const doc = await this.model.create(dto);
return plainToClass(