create tokenapi : suseendhiran

This commit is contained in:
suseendhiran17 2022-07-14 09:47:52 +05:30
parent 9217b64011
commit f70810251c

View File

@ -72,11 +72,12 @@ const policyHelper = require('../services/policy.helper');
else
{
new_token = await policyHelper.NewToken();
Authorization.update({token : new_token},{where : {id : 1}})
.then(data=>{res.send({'status':200,'message':"success",'data':data})})
await Authorization.update({token : new_token},{where : {id : 1}})
.catch(err=> {res.send({'status':404,
message: err.message || "Some error occurred while fetching entity applicant masterdata." ,'data': "No data" });
})
token_data = await Authorization.findOne({where : { is_active : 1}})
res.send({'status':200,'message':"success",'data':token_data});
}
})
.catch(err => {