Fix column name for postgre

This commit is contained in:
Haidang666 2021-06-27 11:51:04 +07:00
parent f5bb221ecd
commit f3542b7402

View file

@ -62,7 +62,7 @@ export async function setUsername(req: Request, res: Response) {
try { try {
//check if username is already set //check if username is already set
let row = await db.prepare('get', `SELECT userName FROM "userNames" WHERE "userID" = ? LIMIT 1`, [userID]); let row = await db.prepare('get', `SELECT "userName" FROM "userNames" WHERE "userID" = ? LIMIT 1`, [userID]);
let oldUserName = ''; let oldUserName = '';
if (row.userName && row.userName.length !== 0) { if (row.userName && row.userName.length !== 0) {