add getHashCache where applicable=

This commit is contained in:
Michael C
2021-11-27 02:41:34 -05:00
parent 7e1550f3c0
commit a5a90e3c84
24 changed files with 90 additions and 47 deletions

View File

@@ -1,7 +1,7 @@
import { Request, Response } from "express";
import { Logger } from "../utils/logger";
import { isUserVIP } from "../utils/isUserVIP";
import { getHash } from "../utils/getHash";
import { getHashCache } from "../utils/getHashCache";
import { db } from "../databases/databases";
const ACTION_NONE = Symbol("none");
@@ -64,7 +64,7 @@ export async function postSegmentShift(req: Request, res: Response): Promise<Res
}
// Check if user is VIP
userID = getHash(userID);
userID = await getHashCache(userID);
const userIsVIP = await isUserVIP(userID);
if (!userIsVIP) {