Fixed WebPush Notification error subscription

This commit is contained in:
Paolo Arena
2021-10-05 15:39:44 +02:00
parent 3d7471f2d2
commit 87739a5847
3 changed files with 669 additions and 469 deletions

View File

@@ -352,7 +352,7 @@ router.post('/login', (req, res) => {
.then(user => {
if (user) {
return user.generateAuthToken(req).then((token) => {
var usertosend = User();
var usertosend = new User();
shared_consts.fieldsUserToChange().forEach((field) => {
usertosend[field] = user[field]