Notification New Group
This commit is contained in:
@@ -44,7 +44,7 @@ router.post('/', authenticate, (req, res) => {
|
||||
}).then(async (recmyevent) => {
|
||||
// tools.mylog('myevent:', myevent);
|
||||
// tools.mylog('already exist');
|
||||
SendNotif.createNewNotification(req, res, shared_consts.TABLES_MYEVENTS, recmyevent, shared_consts.TypeNotifs.TYPEDIR_EVENTS, shared_consts.TypeNotifs.ID_EVENTS_NEW_REC);
|
||||
SendNotif.createNewNotification(req, res, {}, shared_consts.TABLES_MYEVENTS, recmyevent, shared_consts.TypeNotifs.TYPEDIR_EVENTS, shared_consts.TypeNotifs.ID_EVENTS_NEW_REC);
|
||||
return res;
|
||||
}).then((res) => {
|
||||
res.send({code: server_constants.RIS_CODE_OK, msg: '', id: recmyevent._id});
|
||||
@@ -59,7 +59,7 @@ router.post('/', authenticate, (req, res) => {
|
||||
myevent.findById(idobj).then((recmyevent) => {
|
||||
recmyevent.typedir = shared_consts.TypeNotifs.TYPEDIR_EVENTS
|
||||
recmyevent.typeid = shared_consts.TypeNotifs.ID_EVENTS_NEW_REC
|
||||
SendNotif.createNewNotification(req, res, shared_consts.TABLES_MYEVENTS, recmyevent, shared_consts.TypeNotifs.TYPEDIR_EVENTS, shared_consts.TypeNotifs.ID_EVENTS_NEW_REC);
|
||||
SendNotif.createNewNotification(req, res, {}, shared_consts.TABLES_MYEVENTS, recmyevent, shared_consts.TypeNotifs.TYPEDIR_EVENTS, shared_consts.TypeNotifs.ID_EVENTS_NEW_REC);
|
||||
return res.send({code: server_constants.RIS_CODE_OK, msg: '', id: recmyevent._id});
|
||||
});
|
||||
});
|
||||
@@ -79,7 +79,7 @@ router.delete('/:id/:notify/:idapp', authenticate, (req, res) => {
|
||||
}
|
||||
|
||||
if (notify === '1') {
|
||||
SendNotif.createNewNotification(req, res, shared_consts.TABLES_MYEVENTS, recmyevent, shared_consts.TypeNotifs.TYPEDIR_EVENTS, shared_consts.TypeNotifs.ID_EVENTS_REMOVE_REC);
|
||||
SendNotif.createNewNotification(req, res, {}, shared_consts.TABLES_MYEVENTS, recmyevent, shared_consts.TypeNotifs.TYPEDIR_EVENTS, shared_consts.TypeNotifs.ID_EVENTS_REMOVE_REC);
|
||||
}
|
||||
|
||||
tools.mylog('DELETED ', recmyevent.descr, recmyevent._id);
|
||||
|
||||
Reference in New Issue
Block a user