create tokenapi : suseendhiran
This commit is contained in:
parent
9217b64011
commit
f70810251c
@ -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 => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user