bugfix: reset admin password

This commit is contained in:
Dave Horton
2021-06-26 19:29:54 -04:00
parent a79f77934e
commit f66814fff2

View File

@@ -38,7 +38,9 @@ const doIt = async() => {
const api_key_sid = uuidv4();
const token = uuidv4();
const [r] = await promisePool.query(sqlQueryAccount);
await promisePool.execute(sqlAddAccountAdminToken, [api_key_sid, token, r[0].account_sid]);
if (r.length > 0) {
await promisePool.execute(sqlAddAccountAdminToken, [api_key_sid, token, r[0].account_sid]);
}
process.exit(0);
};