diff --git a/app/controllers/jwt_controller.js b/app/controllers/jwt_controller.js index 520a47d..dfe3ba0 100644 --- a/app/controllers/jwt_controller.js +++ b/app/controllers/jwt_controller.js @@ -15,9 +15,9 @@ module.exports.addMacValue= async(req, res, next)=>{ const {key, mac_id, mail, company_name, app_version} = req.body const mac =await MacModel.findOne({where:{licency_key: key},raw:true}); - //Check License Key IN DB - if (mac.licency_key == key) { + if (mac && mac.licency_key == key) + { //Check isActive and App Version are Same if (mac.isActive == false && mac.app_version == app_version) {