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

@@ -1,6 +1,6 @@
const express = require('express');
const router = express.Router();
const mongoose = require('mongoose').set('debug', false);
const mongoose = require('mongoose').set('debug', process.env.DEBUG);
const Subscription = mongoose.model('subscribers');
// const q = require('q');
const webpush = require('web-push');
@@ -89,10 +89,10 @@ router.post('/', (req, res) => {
async function SendMsgTo(idapp, username, params) {
return User.find({idapp, username}).then((arrusers) => {
return await User.find({idapp, username}).then(async (arrusers) => {
if (arrusers !== null) {
for (const user of arrusers) {
tools.sendNotificationToUser(user._id, params.title, params.content,
await tools.sendNotificationToUser(user._id, params.title, params.content,
params.openUrl, params.openUrl2, params.tag, params.actions, params.id).
then(ris => {
if (ris) {