Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

Commit 95be565

Browse files
committed
refactor(subscription-hooks): return promise instead of waiting it
1 parent a6db41e commit 95be565

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/subscription-hook-storage.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ class Subscriptions {
173173
}
174174

175175
const flatModel = flattenObject(subscriptionModel, 'subscription')
176-
await this._storage.update(ids, flatModel)
176+
return this._storage.update(ids, flatModel)
177177
}
178178

179179
_getTargetIdsFromPassthrough(passthrough) {
@@ -245,7 +245,7 @@ class Subscriptions {
245245
}
246246

247247
const flatModel = flattenObject(subscriptionModel, 'subscription')
248-
await this._storage.update(ids, flatModel)
248+
return this._storage.update(ids, flatModel)
249249
}
250250

251251
/**
@@ -281,7 +281,7 @@ class Subscriptions {
281281
}
282282

283283
const flatModel = flattenObject(subscriptionModel, 'subscription')
284-
await this._storage.update(ids, flatModel)
284+
return this._storage.update(ids, flatModel)
285285
}
286286

287287
/**
@@ -307,7 +307,7 @@ class Subscriptions {
307307
}
308308

309309
const flatModel = flattenObject(subscriptionModel, 'subscription')
310-
await this._storage.update(ids, flatModel)
310+
return this._storage.update(ids, flatModel)
311311
}
312312

313313
/**
@@ -333,7 +333,7 @@ class Subscriptions {
333333
}
334334

335335
const flatModel = flattenObject(subscriptionModel, 'subscription')
336-
await this._storage.update(ids, flatModel)
336+
return this._storage.update(ids, flatModel)
337337
}
338338

339339
/**
@@ -359,7 +359,7 @@ class Subscriptions {
359359
}
360360

361361
const flatModel = flattenObject(subscriptionModel, 'subscription')
362-
await this._storage.update(ids, flatModel)
362+
return this._storage.update(ids, flatModel)
363363
}
364364
}
365365

0 commit comments

Comments
 (0)