GWM : app_name column added

This commit is contained in:
bitbucket 2024-08-05 12:37:32 +05:30
parent d9a7283300
commit 3037c0453a
2 changed files with 4 additions and 1 deletions

View File

@ -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}});

View File

@ -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}
},