mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer
This commit is contained in:
commit
c869e60b04
2 changed files with 2 additions and 2 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);
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ describe("setUsername", () => {
|
|||
assert.strictEqual(usernameInfo.locked, 1, "username should be locked");
|
||||
done();
|
||||
})
|
||||
.catch(() => done(`couldn't call endpoint`));
|
||||
.catch((err) => done(`couldn't call endpoint: ${err}`));
|
||||
});
|
||||
|
||||
it("Should filter out unicode control characters", (done: Done) => {
|
||||
|
|
Loading…
Reference in a new issue