Add Optional 2FA Support (#61)
* Add TOTP MFA Support * Add Passkey MFA Support It's not impossible I missed some minor cleanup, but most things make sense and there isn't a lot of obvious duplication anymore. --------- Co-authored-by: Bruno Bernardino <me@brunobernardino.com>
This commit is contained in:
@@ -61,7 +61,19 @@ export default class Database {
|
||||
|
||||
this.db = postgresClient;
|
||||
} else {
|
||||
throw error;
|
||||
console.log('Failed to connect to Postgres!');
|
||||
console.error(error);
|
||||
|
||||
// This allows tests (and the app) to work even if Postgres is not available
|
||||
const mockPostgresClient = {
|
||||
queryObject: () => {
|
||||
return {
|
||||
rows: [],
|
||||
};
|
||||
},
|
||||
} as unknown as Client;
|
||||
|
||||
this.db = mockPostgresClient;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user