mirror of
https://github.com/matt-fidd/stratos.git
synced 2026-01-01 17:59:25 +00:00
Close database connection when finished with it
This commit is contained in:
@@ -32,6 +32,8 @@ class PasswordReset {
|
||||
token
|
||||
]);
|
||||
|
||||
conn.close();
|
||||
|
||||
if (!record.length)
|
||||
throw new Error('No password reset found');
|
||||
|
||||
@@ -69,6 +71,8 @@ class PasswordReset {
|
||||
|
||||
await conn.runQuery(sql, [ u.id ]);
|
||||
|
||||
conn.close();
|
||||
|
||||
const [ nonce, token ] = await PasswordReset.hashToken(u);
|
||||
|
||||
const d = new Date();
|
||||
|
||||
Reference in New Issue
Block a user