mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added way to not save SMBIOS information in the DB.
This commit is contained in:
parent
fc4f469e63
commit
7653d1c398
2 changed files with 14 additions and 11 deletions
10
db.js
10
db.js
|
@ -726,19 +726,19 @@ module.exports.CreateDB = function (parent, func) {
|
|||
conn.release();
|
||||
const docs = [];
|
||||
for (var i in rows) { if (rows[i].doc) { docs.push(performTypedRecordDecrypt(JSON.parse(rows[i].doc))); } }
|
||||
if (func) try { func(null, docs); } catch (ex) { console.log(ex); }
|
||||
if (func) try { func(null, docs); } catch (ex) { console.log('SQLERR1', ex); }
|
||||
})
|
||||
.catch(function (err) { conn.release(); if (func) try { func(err); } catch (ex) { console.log(ex); } });
|
||||
}).catch(function (err) { if (func) { try { func(err); } catch (ex) { console.log(ex); } } });
|
||||
.catch(function (err) { conn.release(); if (func) try { func(err); } catch (ex) { console.log('SQLERR2', ex); } });
|
||||
}).catch(function (err) { if (func) { try { func(err); } catch (ex) { console.log('SQLERR3', ex); } } });
|
||||
} else if (obj.databaseType == 5) { // MySQL
|
||||
Datastore.query(query, args, function (error, results, fields) {
|
||||
if (error != null) {
|
||||
if (func) try { func(error); } catch (ex) { console.log(ex); }
|
||||
if (func) try { func(error); } catch (ex) { console.log('SQLERR4', ex); }
|
||||
} else {
|
||||
var docs = [];
|
||||
for (var i in results) { if (results[i].doc) { docs.push(JSON.parse(results[i].doc)); } }
|
||||
//console.log(docs);
|
||||
if (func) { try { func(null, docs); } catch (ex) { console.log(ex); } }
|
||||
if (func) { try { func(null, docs); } catch (ex) { console.log('SQLERR5', ex); } }
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue