Circuits...
Circuits Fido e Max Qta Fixed error eslint: 7.0.0 is OK
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user