Commit 6f888186 authored by Wolfgang Knopki's avatar Wolfgang Knopki
Browse files

api call cd /home/knopkiwg/m4lab/user-account/config

parent 91ac91fe
...@@ -5,7 +5,7 @@ module.exports = function (app) { ...@@ -5,7 +5,7 @@ module.exports = function (app) {
//console.log(dbconn); //console.log(dbconn);
//var con = dbconn.connection //var con = dbconn.connection
app.get('/api/v1/profile', function (req, res) { app.get('/account/api/v1/profile', function (req, res) {
if (req.isAuthenticated()) { if (req.isAuthenticated()) {
// read data based on ID // 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) { 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) { ...@@ -13,7 +13,7 @@ module.exports = function (app) {
res.send(rows[0]) res.send(rows[0])
}) })
} else { } else {
res.redirect('/'); res.redirect('/account/');
} }
}); });
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment