From f9b92de8915cd2f322329167b9c3c9a13e10b2be Mon Sep 17 00:00:00 2001 From: Wolfgang Knopki <wolfgang.knopki@hft-stuttgart.de> Date: Mon, 9 Dec 2019 14:59:48 +0100 Subject: [PATCH] api call cd /home/knopkiwg/m4lab/user-account/config --- routes/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/api.js b/routes/api.js index d18af65f..901e8de1 100644 --- a/routes/api.js +++ b/routes/api.js @@ -5,7 +5,7 @@ module.exports = function (app) { //console.log(dbconn); //var con = dbconn.connection - app.get('/api/v1/profile', function (req, res) { + app.get('/account/api/v1/profile', function (req, res) { if (req.isAuthenticated()) { // read data based on ID dbconn.user.query('SELECT title, firstname, lastname, email, industry, organisation, speciality FROM user WHERE email="'+req.user.email+'"', function (err, rows, fields) { @@ -13,7 +13,7 @@ module.exports = function (app) { res.send(rows[0]) }) } else { - res.redirect('/'); + res.redirect('/account/'); } }); -- GitLab