CHECKFROMDB : AADHAVAN

This commit is contained in:
aadhavan valli 2024-02-17 15:11:13 +05:30
parent 5e19ffde59
commit 1a445ca96b

View File

@ -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) {