Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
User Account
Commits
6f888186
Commit
6f888186
authored
Dec 09, 2019
by
Wolfgang Knopki
Browse files
api call cd /home/knopkiwg/m4lab/user-account/config
parent
91ac91fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
routes/api.js
View file @
6f888186
...
...
@@ -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/
'
);
}
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment