Disabled debug Mongoose

Updated modules
fixed tests
This commit is contained in:
Paolo Arena
2021-09-22 01:13:41 +02:00
parent 10e9da805e
commit 396bfea289
73 changed files with 2831 additions and 2853 deletions

View File

@@ -1,6 +1,6 @@
const express = require('express');
const router = express.Router();
const mongoose = require('mongoose');
const mongoose = require('mongoose').set('debug', false)
const Subscription = mongoose.model('subscribers');
// const q = require('q');
const webpush = require('web-push');
@@ -47,7 +47,7 @@ router.post('/', (req, res) => {
const pushPayload = JSON.stringify(payload);
const pushOptions = {
vapidDetails: {
subject: process.env.URLBASE_APP1,
subject: process.env.VAPI_KEY_SUBJECT,
privateKey: process.env.PRIVATE_VAPI_KEY,
publicKey: process.env.PUBLIC_VAPI_KEY,
},
@@ -126,7 +126,7 @@ async function SendMsgToParam(idapp, params) {
}else if (params.typemsg === shared_consts.TypeMsg.SEND_TO_NON_SOCI) {
invia = !user.profile.socio;
}else if (params.typemsg === shared_consts.TypeMsg.SEND_TO_PAOLO) {
invia = user.username === 'paoloarcnm';
invia = user.username === 'paoloar77';
} else {
invia = true;
}