Skip to content

Commit

Permalink
Changed visibility of getOneOrFail() getOneShallowOrFail() and prepar…
Browse files Browse the repository at this point in the history
…eEntityBeforeSave() to protected
  • Loading branch information
Alex M committed Nov 8, 2019
1 parent 09b8248 commit fab8bf9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/crud-typeorm/src/typeorm-crud.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export class TypeOrmCrudService<T> extends CrudService<T> {
);
}

private async getOneOrFail(req: CrudRequest): Promise<T> {
protected async getOneOrFail(req: CrudRequest): Promise<T> {
const { parsed, options } = req;
const builder = await this.createBuilder(parsed, options);
const found = await builder.getOne();
Expand All @@ -444,7 +444,7 @@ export class TypeOrmCrudService<T> extends CrudService<T> {
return found;
}

private async getOneShallowOrFail(where: ObjectLiteral): Promise<T> {
protected async getOneShallowOrFail(where: ObjectLiteral): Promise<T> {
const found = await this.findOne({ where });

if (!found) {
Expand All @@ -454,7 +454,7 @@ export class TypeOrmCrudService<T> extends CrudService<T> {
return found;
}

private prepareEntityBeforeSave(dto: DeepPartial<T>, parsed: CrudRequest['parsed']): T {
protected prepareEntityBeforeSave(dto: DeepPartial<T>, parsed: CrudRequest['parsed']): T {
/* istanbul ignore if */
if (!isObject(dto)) {
return undefined;
Expand Down

0 comments on commit fab8bf9

Please sign in to comment.