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
7f16213d
Commit
7f16213d
authored
Mar 31, 2021
by
Rosanny Sihombing
Browse files
delete unused codes
parent
0b5fb9db
Changes
1
Hide whitespace changes
Inline
Side-by-side
routes/api_TBD.js
deleted
100644 → 0
View file @
0b5fb9db
// ==== USER ACOOUNT API ====
var
dbconn
=
require
(
'
./dbconn
'
)
module
.
exports
=
function
(
app
)
{
//console.log(dbconn);
//var con = dbconn.connection
app
.
get
(
'
/api/v1/profile
'
,
function
(
req
,
res
)
{
if
(
req
.
isAuthenticated
())
{
// 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
.
send
(
'
authentication required
'
);
}
});
}
\ No newline at end of file
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