fix: added await in calling set tpin

This commit is contained in:
2025-11-08 20:27:37 +05:30
parent c39492edde
commit b9c9d35f74

View File

@@ -171,7 +171,7 @@ async function setTpin(req, res) {
const { tpin } = req.body;
if (!/^\d{6}$/.test(tpin))
return res.status(400).json({ error: 'INVALID_TPIN_FORMAT' });
authService.setTpin(customerNo, tpin);
await authService.setTpin(customerNo, tpin);
return res.json({ message: 'TPIN_SET' });
} catch (error) {
logger.error(error);