[fix] When regenerating license file during the check for updates, include only important system parameters which were picked during last activation

[impl] Add mainboard serial as third most important parameter
This commit is contained in:
Peter Sykora 2019-01-20 00:49:18 +01:00
parent 2a0da0dc51
commit dc8ffb9050
2 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,7 @@
*/
exports.pickParams = function (appId, systemParams) {
// if (appId === 'coc') {
const appParams = ['biosSerialNum', 'osId', 'diskSerialNum', 'nicMac'];
const appParams = ['biosSerialNum', 'osId', 'mainboardSerialNum', 'diskSerialNum', 'nicMac'];
const requiredParams = 2;
// }

View File

@ -272,7 +272,9 @@ exports.check = async function (db, productId, systemParams, activationId, modul
let activatedParamObj = {}
for (elm of activatedParams) {
activatedParamObj[elm.paramId] = elm.paramValue;
if (elm.flag & 1) {
activatedParamObj[elm.paramId] = elm.paramValue;
}
}
return {