From 3037c0453a569ec6dbb68985a1f9f37651bd1f1c Mon Sep 17 00:00:00 2001 From: bitbucket Date: Mon, 5 Aug 2024 12:37:32 +0530 Subject: [PATCH] GWM : app_name column added --- app/controllers/jwt_controller.js | 4 +++- app/models/MacModel.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/jwt_controller.js b/app/controllers/jwt_controller.js index 3e0dd29..930f61b 100644 --- a/app/controllers/jwt_controller.js +++ b/app/controllers/jwt_controller.js @@ -10,7 +10,7 @@ module.exports.addMacValue= async(req, res, next)=>{ try { const cryptr = new Cryptr('7B-q;Vn@oGc^aPtk:0QP/SyDoHw!,(L2{2uZP&jZw5l]*>s~,%Z+kaD1tloQU', { encoding: 'base64', pbkdf2Iterations: 10000, saltLength: 5 }); - let {key, mac_id, company_name, app_version} = req.body + let {key, mac_id, company_name, app_version , app_name} = req.body key = cryptr.decrypt(key); mac_id = cryptr.decrypt(mac_id); @@ -44,6 +44,7 @@ module.exports.addMacValue= async(req, res, next)=>{ activation_date: today, expiry_date : formatedDate, isActive : true, + app_name : app_name } const macUpdate = await MacModel.update(info, {where:{id: mac.id}}); @@ -69,6 +70,7 @@ module.exports.addMacValue= async(req, res, next)=>{ activation_date: today, expiry_date : formatedDate, isActive : true, + app_name : app_name } const macUpdate = await MacModel.update(info, {where:{id: mac.id}}); diff --git a/app/models/MacModel.js b/app/models/MacModel.js index 5ed9764..2a8170b 100644 --- a/app/models/MacModel.js +++ b/app/models/MacModel.js @@ -15,6 +15,7 @@ module.exports = (sequelize, DataTypes) => { expiry_date: {type: DataTypes.STRING}, isActive: {type: DataTypes.BOOLEAN,allowNull: false,defaultValue: false, }, app_version: { type: DataTypes.STRING, }, + app_name: { type: DataTypes.STRING, }, createdAt: {type: DataTypes.DATE,allowNull: true}, updatedAt: {type: DataTypes.DATE,allowNull: true} },