Fix hashing empty value for patreon sign in

This commit is contained in:
Ajay 2022-10-26 12:56:40 -04:00
parent ee56a8dea4
commit 13ae4681cb

View file

@ -15,7 +15,7 @@ interface GenerateTokenRequest extends Request {
export async function generateTokenRequest(req: GenerateTokenRequest, res: Response): Promise<Response> {
const { query: { code, adminUserID }, params: { type } } = req;
const adminUserIDHash = await getHashCache(adminUserID);
const adminUserIDHash = adminUserID ? (await getHashCache(adminUserID)) : null;
if (!code || !type) {
return res.status(400).send("Invalid request");