fix: added await in calling set tpin
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user