Notifiche - Tutti - non letti

This commit is contained in:
Paolo Arena
2022-07-21 00:21:03 +02:00
parent cbd65ccdbe
commit e9ce597027
10 changed files with 235 additions and 177 deletions

View File

@@ -131,16 +131,12 @@ router.post('/send', authenticate, async (req, res) => {
}
try {
if (params.typesend === 0)
params.typesend = shared_consts.TypeSend.PUSH_NOTIFICATION;
if (params.typemsg === shared_consts.TypeMsg.SEND_TO_MYSELF) {
params.usernameDest = req.user.username;
}
const ris = await globalTables.SendMsgToParam(idapp, params);
return res.send({
code: server_constants.RIS_CODE_OK,
msg: ris.nummsgsent + ` Msg ${msgcosa} su ` + ris.numrec + ' !',