Circuits...

Circuits Fido e Max Qta
Fixed error eslint: 7.0.0 is OK
This commit is contained in:
Paolo Arena
2022-09-11 11:45:33 +02:00
parent d262f94315
commit d62888083b
100 changed files with 3699 additions and 2774 deletions

View File

@@ -9,8 +9,6 @@ var { Project } = require('../models/project');
var { authenticate } = require('../middleware/authenticate');
var mongoose = require('mongoose').set('debug', false)
const Subscription = mongoose.model('subscribers');
var { Todo } = require('../models/todo');
@@ -56,7 +54,7 @@ router.post('/', authenticate, async (req, res) => {
.then((writeresult) => {
let idobj = writeresult._id;
return Todo.findById(idobj)
.then(record => {
.then(async (record) => {
// tools.mylog('REC SAVED :', record.descr);
let aggiorna = false;
@@ -72,7 +70,7 @@ router.post('/', authenticate, async (req, res) => {
}
if (aggiorna) {
tools.sendNotificationToUser(todo.userId, titolo + ' ' + record.descr, record.descr, '/todo/' + todo.category, '', 'todo', [])
await tools.sendNotificationToUser(todo.userId, titolo + ' ' + record.descr, record.descr, '/todo/' + todo.category, '', 'todo', [])
.then(ris => {
if (ris) {
return res.send({ record });