await arbiter

This commit is contained in:
Rolands 2023-07-21 16:49:02 +03:00
parent 59434f74d5
commit 8cc1ab6926

View file

@ -491,7 +491,7 @@ export class SocioServer extends LogHandler {
//Arbiter decides if this query needs be updated. TODO needs to know what changed on the DB as well to make a decidion
if (this.db?.Arbiter)
if (!this.db.Arbiter({ client: initiator, sql, params }, { client, hook })) //if Arbiter returns false, we skip this hook
if (await this.db.Arbiter({ client: initiator, sql, params }, { client, hook }) === false) //if Arbiter returns false, we skip this hook
continue;
if (cache.has(hook.cache_hash))