Step 1: Creating page Messages: userlist last messages + a page for all the messages received and sent.
This commit is contained in:
@@ -318,7 +318,7 @@ router.get('/loadsite/:userId/:idapp/:sall', authenticate_noerror, (req, res) =>
|
||||
const wheres = Where.findAllIdApp(idapp);
|
||||
const contribtype = Contribtype.findAllIdApp(idapp);
|
||||
|
||||
return Promise.all([bookedevent, eventlist, operators, wheres, contribtype, msgs])
|
||||
return Promise.all([bookedevent, eventlist, operators, wheres, contribtype])
|
||||
.then((arrdata) => {
|
||||
// console.table(arrdata);
|
||||
res.send({
|
||||
@@ -355,7 +355,7 @@ router.get(process.env.LINK_CHECK_UPDATES, authenticate, (req, res) => {
|
||||
// const sall = '0';
|
||||
|
||||
// msgs = SendMsg.findAllByUserIdAndIdApp(userId, req.user.username, req.user.idapp);
|
||||
msgs = SendMsg.findLastGroupByUserIdAndIdApp(userId, req.user.username, req.user.idapp);
|
||||
last_msgs = SendMsg.findLastGroupByUserIdAndIdApp(userId, req.user.username, req.user.idapp);
|
||||
|
||||
|
||||
let usersList = null;
|
||||
@@ -368,13 +368,13 @@ router.get(process.env.LINK_CHECK_UPDATES, authenticate, (req, res) => {
|
||||
}
|
||||
}
|
||||
|
||||
return Promise.all([usersList, msgs])
|
||||
return Promise.all([usersList, last_msgs])
|
||||
.then((arrdata) => {
|
||||
// console.table(arrdata);
|
||||
return res.send({
|
||||
cfgServer: arrcfgrec,
|
||||
usersList: arrdata[0],
|
||||
msgs: arrdata[1],
|
||||
last_msgs: arrdata[1],
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user