Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

Commit

Permalink
fix: creation hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Soontao committed Aug 1, 2020
1 parent 9caf47a commit 1b6a554
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/typeorm/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class TypedService<T extends typeof BaseODataModel = any> extends ODataCo
// query the created item
const { identifiers: [id] } = await repo.insert(instance);
// and return it
const created = this.findOne(id, ctx);
const created = await this.findOne(id, ctx);
await this._executeHooks({ context: ctx, hookType: HookType.afterSave, data: created });
return created;
}
Expand Down

0 comments on commit 1b6a554

Please sign in to comment.