GWM : app_name column added
This commit is contained in:
parent
d9a7283300
commit
3037c0453a
@ -10,7 +10,7 @@ module.exports.addMacValue= async(req, res, next)=>{
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
const cryptr = new Cryptr('7B-q;Vn@oGc^aPtk:0QP/SyDoHw!,(L2{2uZP&jZw5l]*>s~,%Z+kaD1tloQU', { encoding: 'base64', pbkdf2Iterations: 10000, saltLength: 5 });
|
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);
|
key = cryptr.decrypt(key);
|
||||||
mac_id = cryptr.decrypt(mac_id);
|
mac_id = cryptr.decrypt(mac_id);
|
||||||
@ -44,6 +44,7 @@ module.exports.addMacValue= async(req, res, next)=>{
|
|||||||
activation_date: today,
|
activation_date: today,
|
||||||
expiry_date : formatedDate,
|
expiry_date : formatedDate,
|
||||||
isActive : true,
|
isActive : true,
|
||||||
|
app_name : app_name
|
||||||
}
|
}
|
||||||
|
|
||||||
const macUpdate = await MacModel.update(info, {where:{id: mac.id}});
|
const macUpdate = await MacModel.update(info, {where:{id: mac.id}});
|
||||||
@ -69,6 +70,7 @@ module.exports.addMacValue= async(req, res, next)=>{
|
|||||||
activation_date: today,
|
activation_date: today,
|
||||||
expiry_date : formatedDate,
|
expiry_date : formatedDate,
|
||||||
isActive : true,
|
isActive : true,
|
||||||
|
app_name : app_name
|
||||||
}
|
}
|
||||||
const macUpdate = await MacModel.update(info, {where:{id: mac.id}});
|
const macUpdate = await MacModel.update(info, {where:{id: mac.id}});
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,7 @@ module.exports = (sequelize, DataTypes) => {
|
|||||||
expiry_date: {type: DataTypes.STRING},
|
expiry_date: {type: DataTypes.STRING},
|
||||||
isActive: {type: DataTypes.BOOLEAN,allowNull: false,defaultValue: false, },
|
isActive: {type: DataTypes.BOOLEAN,allowNull: false,defaultValue: false, },
|
||||||
app_version: { type: DataTypes.STRING, },
|
app_version: { type: DataTypes.STRING, },
|
||||||
|
app_name: { type: DataTypes.STRING, },
|
||||||
createdAt: {type: DataTypes.DATE,allowNull: true},
|
createdAt: {type: DataTypes.DATE,allowNull: true},
|
||||||
updatedAt: {type: DataTypes.DATE,allowNull: true}
|
updatedAt: {type: DataTypes.DATE,allowNull: true}
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user