Notification: Set a new Friendship and Accepted Friendship
This commit is contained in:
@@ -23,13 +23,19 @@ const {ObjectID} = require('mongodb');
|
||||
//GET orders
|
||||
router.post('/page', authenticate, function(req, res, next) {
|
||||
|
||||
//++TODO: PERMESSI ???
|
||||
const {SendNotif} = require('../models/sendnotif');
|
||||
|
||||
try {
|
||||
let table = req.body.table;
|
||||
let id = req.body.id;
|
||||
let idapp = req.body.idapp;
|
||||
|
||||
const username = req.user.username ? req.user.username : '';
|
||||
|
||||
// Check if ìs a Notif to read
|
||||
const idnotif = req.body.idnotif ? req.body.idnotif : '';
|
||||
SendNotif.setNotifAsRead(idapp, username, idnotif);
|
||||
|
||||
let mytable = null;
|
||||
if (shared_consts.TABLES_ENABLE_GETREC_BYID.includes(table)) {
|
||||
mytable = globalTables.getTableByTableName(table);
|
||||
|
||||
Reference in New Issue
Block a user