Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
Do not await logged models
Browse files Browse the repository at this point in the history
  • Loading branch information
evantahler committed Nov 10, 2020
1 parent a094ff7 commit 1cbe2ac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/api/src/classes/loggedModel.ts
Expand Up @@ -43,7 +43,7 @@ export abstract class LoggedModel<T> extends Model<T> {

@AfterCreate
static async logCreate(instance) {
await Log.create({
Log.create({
topic: modelName(instance),
verb: "create",
ownerGuid: instance.guid,
Expand All @@ -64,7 +64,7 @@ export abstract class LoggedModel<T> extends Model<T> {
static async logBulkCreate(instances) {
for (const i in instances) {
const instance = instances[i];
await Log.create({
Log.create({
topic: modelName(instance),
verb: "create",
ownerGuid: instance.guid,
Expand All @@ -76,7 +76,7 @@ export abstract class LoggedModel<T> extends Model<T> {

@AfterUpdate
static async logUpdate(instance) {
await Log.create({
Log.create({
topic: modelName(instance),
verb: "update",
ownerGuid: instance.guid,
Expand All @@ -87,7 +87,7 @@ export abstract class LoggedModel<T> extends Model<T> {

@AfterDestroy
static async logDestroy(instance) {
await Log.create({
Log.create({
topic: modelName(instance),
verb: "destroy",
ownerGuid: instance.guid,
Expand Down

0 comments on commit 1cbe2ac

Please sign in to comment.