Strutturato le Traduzioni del Sito Specifico

Inizio creazione di SalviamoIlPianeta.app
This commit is contained in:
Paolo Arena
2020-04-10 13:02:33 +02:00
parent 7c575c0687
commit 4a9fa9cf61
14 changed files with 303 additions and 33 deletions

View File

@@ -57,7 +57,7 @@ const todos_router = require('./router/todos_router');
const test_router = require('./router/test_router');
const projects_router = require('./router/projects_router');
const users_router = require('./router/users_router');
const notevole_router = require('./router/notevole_router');
const site_router = require('./router/site_router');
const admin_router = require('./router/admin_router');
const { MyEvent } = require('./models/myevent');
@@ -121,7 +121,7 @@ app.use('/todos', todos_router);
app.use('/test', test_router);
app.use('/projects', projects_router);
app.use('/users', users_router);
app.use('/ayni', notevole_router);
app.use('/site', site_router);
app.use('/admin', admin_router);
// catch 404 and forward to error handler
@@ -253,16 +253,18 @@ function testmsgwebpush() {
// console.log('nomeapp 1: ' , tools.getNomeAppByIdApp(1));
// console.log('nomeapp 2: ' , tools.getNomeAppByIdApp(2));
User.findOne().then((user) => {
if (user !== null) {
tools.sendNotificationToUser(user._id, 'Titolo msg Test', 'Test Messaggio', '/', 'msg')
.then(ris => {
if (ris) {
User.find({ username: 'paoloar77' }).then((arrusers) => {
if (arrusers !== null) {
for (const user of arrusers) {
tools.sendNotificationToUser(user._id, 'Titolo msg Test', 'Test Messaggio', '/', 'msg')
.then(ris => {
if (ris) {
} else {
// already sent the error on calling sendNotificationToUser
}
})
} else {
// already sent the error on calling sendNotificationToUser
}
})
}
}
});
@@ -270,7 +272,7 @@ function testmsgwebpush() {
// Cron every X minutes
cron.schedule('*/2 * * * *', () => {
console.log('Running Cron Job');
// console.log('Running Cron Job');
mycron();
});