feat : onboarding new CIF by giving rights through admin portal.

feat : View the user rights and update in admin portal.
chore : Add some template message for OTP
This commit is contained in:
2025-09-09 11:15:28 +05:30
parent 445a0f434d
commit 50c375f0ba
6 changed files with 106 additions and 60 deletions

View File

@@ -37,4 +37,11 @@ async function getCustomerDetails(customerNo) {
}
}
module.exports = { validateAdmin, findAdminByUserName,getCustomerDetails };
async function getCustomerDetailsFromDB(customerNo) {
const result = await db.query('SELECT customer_no,created_at,last_login,is_first_login,ib_access_level,mb_access_level FROM users WHERE customer_no = $1', [
customerNo,
]);
return result.rows[0];
}
module.exports = { validateAdmin, findAdminByUserName, getCustomerDetails,getCustomerDetailsFromDB };