mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-14 07:27:01 +03:00
Fix hashing empty value for patreon sign in
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user