Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
User Account
Commits
a6fa8da9
Commit
a6fa8da9
authored
5 years ago
by
Rosanny Sihombing
Browse files
Options
Download
Email Patches
Plain Diff
add route for project-list
parent
3fecf9ff
master
MLAB-677
devel
devel_wolfgang
patch-1
reset-jul13
reset-merge
test_logoutbutton
testing
2 merge requests
!2
Mlab 56
,
!1
Devel
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
routes/routes.js
+24
-9
routes/routes.js
with
24 additions
and
9 deletions
+24
-9
routes/routes.js
+
24
-
9
View file @
a6fa8da9
...
...
@@ -114,12 +114,12 @@ module.exports = function (app, config, passport, i18n) {
var
lang
=
'
DE
'
// ======== APP ROUTES ====================
// ======== APP ROUTES
- ACCOUNT
====================
app
.
get
(
'
/
'
,
function
(
req
,
res
)
{
if
(
req
.
isAuthenticated
())
{
methods
.
getUserByEmail
(
req
.
user
.
email
,
function
(
data
,
err
){
if
(
!
err
)
{
res
.
render
(
lang
+
'
/home
'
,
{
res
.
render
(
lang
+
'
/
account/
home
'
,
{
user
:
data
});
}
...
...
@@ -167,7 +167,7 @@ module.exports = function (app, config, passport, i18n) {
if
(
req
.
isAuthenticated
())
{
methods
.
getUserByEmail
(
req
.
user
.
email
,
function
(
data
,
err
){
if
(
!
err
)
{
res
.
render
(
lang
+
'
/profile
'
,
{
res
.
render
(
lang
+
'
/
account/
profile
'
,
{
user
:
data
,
email
:
req
.
user
.
email
});
...
...
@@ -231,7 +231,7 @@ module.exports = function (app, config, passport, i18n) {
}
// render the page
res
.
render
(
lang
+
'
/services
'
,
{
res
.
render
(
lang
+
'
/
account/
services
'
,
{
user
:
req
.
user
,
project
:
allProjects
});
...
...
@@ -244,7 +244,7 @@ module.exports = function (app, config, passport, i18n) {
app
.
get
(
'
/security
'
,
function
(
req
,
res
)
{
if
(
req
.
isAuthenticated
())
{
res
.
render
(
lang
+
'
/security
'
,
{
res
.
render
(
lang
+
'
/
account/
security
'
,
{
user
:
req
.
user
// useful for view engine, useless for HTML
});
}
else
{
...
...
@@ -362,7 +362,7 @@ module.exports = function (app, config, passport, i18n) {
});
app
.
get
(
'
/forgotPwd
'
,
function
(
req
,
res
)
{
res
.
render
(
lang
+
'
/forgotPwd
'
,
{
res
.
render
(
lang
+
'
/
account/
forgotPwd
'
,
{
user
:
req
.
user
});
});
...
...
@@ -446,7 +446,7 @@ module.exports = function (app, config, passport, i18n) {
res
.
redirect
(
'
/forgotPwd
'
);
// localhost
}
else
{
res
.
render
(
lang
+
'
/reset
'
);
res
.
render
(
lang
+
'
/
account/
reset
'
);
}
});
});
...
...
@@ -498,7 +498,7 @@ module.exports = function (app, config, passport, i18n) {
// todo: user registration with captcha
app
.
get
(
'
/registration
'
,
function
(
req
,
res
)
{
res
.
render
(
lang
+
'
/registration
'
)
res
.
render
(
lang
+
'
/
account/
registration
'
)
})
app
.
post
(
'
/registration
'
,
function
(
req
,
res
)
{
...
...
@@ -543,7 +543,6 @@ module.exports = function (app, config, passport, i18n) {
});
})
app
.
get
(
'
/email/:email
'
,
function
(
req
,
res
)
{
methods
.
checkUserEmail
(
req
.
params
.
email
,
function
(
err
,
user
){
if
(
!
err
)
{
...
...
@@ -557,4 +556,20 @@ module.exports = function (app, config, passport, i18n) {
})
})
// ======== APP ROUTES - PROJECT LIST ====================
app
.
get
(
'
/project
'
,
function
(
req
,
res
)
{
if
(
req
.
isAuthenticated
())
{
console
.
log
(
"
true
"
)
res
.
render
(
lang
+
'
/projectList/projects
'
,
{
isUserAuthenticated
:
true
});
}
else
{
console
.
log
(
"
false
"
)
res
.
render
(
lang
+
'
/projectList/projects
'
,
{
isUserAuthenticated
:
false
});
}
})
};
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets