mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 09:07:47 +01:00
Check against number for username lock
This commit is contained in:
parent
e417dade68
commit
f3e5b360c4
1 changed files with 1 additions and 1 deletions
|
@ -46,7 +46,7 @@ export async function setUsername(req: Request, res: Response): Promise<Response
|
|||
}
|
||||
|
||||
try {
|
||||
const row = await db.prepare("get", `SELECT count(*) as userCount FROM "userNames" WHERE "userID" = ? AND "locked" = '1'`, [userID]);
|
||||
const row = await db.prepare("get", `SELECT count(*) as userCount FROM "userNames" WHERE "userID" = ? AND "locked" = 1`, [userID]);
|
||||
if (adminUserIDInput === undefined && row.userCount > 0) {
|
||||
return res.sendStatus(200);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue