Aggiornamenti

This commit is contained in:
Paolo Arena
2020-04-24 10:29:25 +02:00
parent 4a9fa9cf61
commit 2549d43447
21 changed files with 733 additions and 390 deletions

View File

@@ -184,13 +184,15 @@ if (process.env.PROD !== 1) {
testmsgwebpush();
// sendemail.testemail('2', 'it');
/*
let crypt = tools.cryptdata('');
let miapass = '';
if (miapass !== '') {
let crypt = tools.cryptdata(miapass);
let decrypt = tools.decryptdata(crypt);
console.log('crypted:', crypt);
console.log('decrypted:', decrypt);
*/
}
mycron();
}
@@ -217,9 +219,10 @@ startserv();
function populateDBadmin() {
const cfgserv = [{
_id: new ObjectID(),
idapp: '9',
chiave: 'vers',
userId: 'ALL',
valore: '0.0.50'
valore: '0.1.2'
}];
let cfg = new cfgserver(cfgserv[0]).save();
@@ -227,6 +230,7 @@ function populateDBadmin() {
function startserv() {
// populateDBadmin();
// Check if is Empty (new Server Data)
/*
@@ -256,7 +260,7 @@ function testmsgwebpush() {
User.find({ username: 'paoloar77' }).then((arrusers) => {
if (arrusers !== null) {
for (const user of arrusers) {
tools.sendNotificationToUser(user._id, 'Titolo msg Test', 'Test Messaggio', '/', 'msg')
tools.sendNotificationToUser(user._id, 'Server', 'Il Server è Ripartito', '/', '', 'server', [])
.then(ris => {
if (ris) {