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
78329c24
Commit
78329c24
authored
3 years ago
by
Rosanny Sihombing
Browse files
Options
Download
Email Patches
Plain Diff
add customized error when user data is not found
parent
a9b0353c
master
MLAB-677
devel
reset-jul13
reset-merge
testing
6 merge requests
!143
updating yml config
,
!129
Hide mobile menu in account pages
,
!128
Hide mobile menu in account pages
,
!126
prepare production deployment
,
!121
Mlab 566 fix
,
!117
add customized error when user data is not found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
routes/account.ts
+8
-4
routes/account.ts
with
8 additions
and
4 deletions
+8
-4
routes/account.ts
+
8
-
4
View file @
78329c24
...
...
@@ -106,10 +106,14 @@ export = function (app:any, config:any, passport:any, lang:string) {
res
.
redirect
(
'
/login
'
)
}
else
{
let
loggedInUser
=
await
getLoggedInUserData
(
req
.
user
.
email
)
res
.
render
(
lang
+
'
/account/home
'
,
{
user
:
loggedInUser
});
if
(
!
loggedInUser
)
{
console
.
error
(
"
user data is not found
"
)
res
.
status
(
500
).
render
(
lang
+
'
/500
'
,
{
error
:
"
Your data is not found. Please try again.
"
})
}
else
{
res
.
render
(
lang
+
'
/account/home
'
,
{
user
:
loggedInUser
});
}
}
});
...
...
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