Merge pull request #339 from ajayyy/fix-ci

Fix ci
This commit is contained in:
Ajay Ramachandran
2021-08-10 10:59:45 -04:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -46,7 +46,7 @@ export async function setUsername(req: Request, res: Response): Promise<Response
} }
try { 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) { if (adminUserIDInput === undefined && row.userCount > 0) {
return res.sendStatus(200); return res.sendStatus(200);
} }

View File

@@ -168,7 +168,7 @@ describe("setUsername", () => {
assert.strictEqual(usernameInfo.locked, 1, "username should be locked"); assert.strictEqual(usernameInfo.locked, 1, "username should be locked");
done(); done();
}) })
.catch(() => done(`couldn't call endpoint`)); .catch((err) => done(`couldn't call endpoint: ${err}`));
}); });
it("Should filter out unicode control characters", (done: Done) => { it("Should filter out unicode control characters", (done: Done) => {