- DashBoard, Profile, Order Menu

This commit is contained in:
Paolo Arena
2019-12-31 00:44:53 +01:00
parent c39a14bb9e
commit 892eccb4fc
12 changed files with 150 additions and 22 deletions

View File

@@ -33,7 +33,7 @@ function existSubScribe(userId, access, browser) {
// POST /users
router.post('/', async (req, res) => {
tools.mylog("POST /users");
const body = _.pick(req.body, ['email', 'password', 'username', 'name', 'surname', 'idapp', 'keyappid', 'lang', 'profile']);
const body = _.pick(req.body, ['email', 'password', 'username', 'name', 'surname', 'idapp', 'keyappid', 'lang', 'profile', 'aportador_solidario']);
const user = new User(body);
// tools.mylog("LANG PASSATO = " + user.lang, "IDAPP", user.idapp);
@@ -77,7 +77,7 @@ router.post('/', async (req, res) => {
User.findByUsername(user.idapp, user.username)
.then((usertrovato) => {
tools.mylog("TROVATO USERNAME ? ", user.username, usertrovato);
// tools.mylog("TROVATO USERNAME ? ", user.username, usertrovato);
if (usertrovato !== null) {
return user.generateAuthToken(req);
} else {