ver: 0.1.2
Created Test Environment test.freeplanet.app and Server: /var/www/test.freeplanet_server
This commit is contained in:
@@ -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))) {
|
||||
|
||||
Reference in New Issue
Block a user