ver: 0.1.2

Created Test Environment test.freeplanet.app
and Server: /var/www/test.freeplanet_server
This commit is contained in:
Paolo Arena
2021-09-28 23:46:14 +02:00
parent 396bfea289
commit 177489521d
2 changed files with 5 additions and 42 deletions

View File

@@ -141,7 +141,7 @@ async function SendMsgToParam(idapp, params) {
async function SendMsgTo(idapp, username, params) {
return await User.find({ idapp, username }).then((arrusers) => {
return User.find({ idapp, username }).then((arrusers) => {
if (arrusers !== null) {
for (const user of arrusers) {
tools.sendNotificationToUser(user._id, params.title, params.content, params.openUrl, params.openUrl2, params.tag, params.actions)
@@ -165,6 +165,8 @@ router.post('/send', authenticate, async (req, res) => {
const idapp = req.body.idapp;
const params = req.body.params;
// console.log('params', params);
let nummsg = 0;
if ((!User.isAdmin(req.user.perm) && !User.isManager(req.user.perm) && !User.isTutor(req.user.perm))) {