Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed visibility of 3 methods #318

Merged
merged 1 commit into from
Nov 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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