feat: add tag deletion

This commit is contained in:
thecodrr
2021-07-12 10:32:35 +05:00
parent e75c5f7663
commit 8f3e69cd37
7 changed files with 60 additions and 36 deletions

View File

@@ -3,6 +3,8 @@ import EventManager from "./utils/event-manager";
export const EV = new EventManager();
export async function sendCheckUserStatusEvent(type) {
if (process.env.NODE_ENV === "testing") return true;
const results = await EV.publishWithResult(EVENTS.userCheckStatus, type);
if (typeof results === "boolean") return results;
return results.some((r) => r.type === type && r.result === true);