add check for missing user
parent
7b471347bb
commit
0be9133cdc
|
@ -89,7 +89,7 @@ export class SQLiteAdapter extends Database {
|
||||||
public async getUser(email: string): Promise<any> {
|
public async getUser(email: string): Promise<any> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
db.get(`SELECT * FROM authentication WHERE email = ?`, [email], (err: any, row: any) => {
|
db.get(`SELECT * FROM authentication WHERE email = ?`, [email], (err: any, row: any) => {
|
||||||
if (err) {
|
if (err || !row) {
|
||||||
reject(err);
|
reject(err);
|
||||||
console.log(`[database:sqlite] failed to get user ${email}`);
|
console.log(`[database:sqlite] failed to get user ${email}`);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue