GWM
This commit is contained in:
parent
389b5e57d6
commit
ba827f538a
@ -27,13 +27,13 @@ module.exports.addMacValue= async(req, res, next)=>{
|
||||
if (mac.isActive == false && mac.app_version.charAt(0) == app_version.charAt(0) ) {
|
||||
|
||||
today = moment().format('YYYY/MM/DD');
|
||||
if(mac.expiry_type == 'Trail'){
|
||||
if(mac.expiry_type == 'TRAIL'){
|
||||
after10days = moment().add(10, 'day');
|
||||
formatedDate = after10days.format('YYYY/MM/DD');
|
||||
}else if(mac.expiry_type == 'One Year'){
|
||||
}else if(mac.expiry_type == 'ONEYR'){
|
||||
after1year = moment().add(1, 'year');
|
||||
formatedDate = after1year.format('YYYY/MM/DD');
|
||||
}else if(mac.expiry_type == 'Perpetual'){
|
||||
}else if(mac.expiry_type == 'LYFT'){
|
||||
after20year = moment().add(20, 'year');
|
||||
formatedDate = after20year.format('YYYY/MM/DD');
|
||||
}
|
||||
@ -56,11 +56,13 @@ module.exports.addMacValue= async(req, res, next)=>{
|
||||
|
||||
} else {
|
||||
|
||||
if (mac.isActive == true && mac.app_version.charAt(0) == app_version.charAt(0) && mac_id == mac.mac_id && mac.expiry_type != 'Trail' )
|
||||
if (mac.isActive == true && mac.app_version.charAt(0) == app_version.charAt(0) && mac_id == mac.mac_id && mac.expiry_type != 'TRAIL' )
|
||||
{
|
||||
today = moment().format('YYYY/MM/DD');
|
||||
formatedDate = mac.expiry_date;
|
||||
|
||||
if(formatedDate < today){
|
||||
|
||||
const info={
|
||||
mac_id: mac_id,
|
||||
company_name: company_name,
|
||||
@ -75,6 +77,15 @@ module.exports.addMacValue= async(req, res, next)=>{
|
||||
res.send({status:200,message:" Your license has been successfully activated.", data: { expiry_date : cryptr.encrypt(formatedDate), expiry_type : cryptr.encrypt(mac.expiry_type) }})
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
logMsg.info({status:404,message:"Please check the license key and try again. For further assistance, contact our support team.", data: "No Data"});
|
||||
res.send({status:404,message:"Please check the license key and try again. For further assistance, contact our support team.", data: "No Data"})
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}else{
|
||||
|
||||
logMsg.info({status:404,message:"The license key you provided is not valid. Please check the license key and try again. For further assistance, contact our support team.", data: "No Data"});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user