Commit adcfe447 authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

small update

parent 025f0560
......@@ -7,13 +7,13 @@ module.exports = function (app) {
app.get('/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) {
// read data based on email
dbconn.user.query('SELECT * FROM user WHERE email="'+req.user.email+'"', function (err, rows, fields) {
if (err) throw err
res.send(rows[0])
})
} else {
res.redirect('/account/');
res.send('authentication required');
}
});
......
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