Remove username restriction

This commit is contained in:
Ajay
2025-10-03 15:09:02 -04:00
parent 2d5d3637fd
commit c1fc6519b4

View File

@@ -70,16 +70,6 @@ export async function setUsername(req: Request, res: Response): Promise<Response
if (await isUserBanned(hashedUserID)) {
return res.sendStatus(200);
}
const [segments, titles, thumbs] = await Promise.all([
db.prepare("get", `SELECT count(*) AS "count" FROM "sponsorTimes" WHERE "userID" = ? LIMIT 1`, [hashedUserID]),
db.prepare("get", `SELECT count(*) AS "count" FROM "titles" WHERE "userID" = ? LIMIT 1`, [hashedUserID]),
db.prepare("get", `SELECT count(*) AS "count" FROM "thumbnails" WHERE "userID" = ? LIMIT 1`, [hashedUserID]),
]) as {count: number}[];
if (segments.count === 0 && titles.count === 0 && thumbs.count === 0) {
return res.sendStatus(200);
}
}
}
catch (error) /* istanbul ignore next */ {