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,5 +1,5 @@
import { Logger } from "../utils/logger";
import { getHash } from "../utils/getHash";
import { getHashCache } from "../utils/getHashCache";
import { isUserVIP } from "../utils/isUserVIP";
import { Request, Response } from "express";
import { HashedUserID, UserID } from "../types/user.model";
@@ -13,7 +13,7 @@ export async function getIsUserVIP(req: Request, res: Response): Promise<Respons
}
//hash the userID
const hashedUserID: HashedUserID = getHash(userID);
const hashedUserID: HashedUserID = await getHashCache(userID);
try {
const vipState = await isUserVIP(hashedUserID);