diff --git a/src/core/BaseService.ts b/src/core/BaseService.ts index 7a8fccc3..51a64095 100644 --- a/src/core/BaseService.ts +++ b/src/core/BaseService.ts @@ -446,7 +446,11 @@ export class BaseService { return manager.save(entity as any, { reload: true }); } - async createMany(data: DeepPartial[], userId: string, options?: BaseOptions): Promise { + async createMany( + data: DeepPartial[], + userId: string, + options?: BaseOptionsExtended + ): Promise { const manager = this.extractManager(options); const createdByIdObject: WarthogSpecialModel = this.hasColumn('createdById') ? { createdById: userId } @@ -485,7 +489,7 @@ export class BaseService { data: DeepPartial, where: W, userId: string, - options?: BaseOptions + options?: BaseOptionsExtended ): Promise { const manager = this.extractManager(options); const found = await this.findOne(where); @@ -505,7 +509,11 @@ export class BaseService { return manager.findOneOrFail(this.entityClass, result.id); } - async delete(where: any, userId: string, options?: BaseOptions): Promise { + async delete( + where: any, + userId: string, + options?: BaseOptionsExtended + ): Promise { const manager = this.extractManager(options); // V3: TODO: we shouldn't look for the column name, we should see if they've decorated the