Aggiornamento Traduzioni ...

This commit is contained in:
Paolo Arena
2020-03-31 20:34:24 +02:00
parent d59ee578c9
commit 8c9a5f7518
14 changed files with 946 additions and 269 deletions

View File

@@ -331,6 +331,32 @@ async function getInfoUser(idapp, username) {
}
router.patch('/setlang', authenticate, async (req, res) => {
const username = req.body.data.username;
const idapp = req.body.idapp;
const mydata = req.body.data;
const lang = mydata.lang;
const fieldsvalue = {
lang
};
if (!!lang) {
const rec = await User.findByUsername(idapp, username, false);
let ris = null;
if (!!rec)
ris = await User.findByIdAndUpdate(rec.id, { $set: fieldsvalue });
if (!!ris) {
return res.send({ code: server_constants.RIS_CODE_OK, msg: '' });
}
res.status(400).send();
}
});
router.patch('/chval', authenticate, async (req, res) => {
// const idapp = req.body.idapp;