Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
PMRMS Auth
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ghitha Dinan
PMRMS Auth
Commits
aff05d4f
Commit
aff05d4f
authored
Jan 10, 2022
by
Ghitha Dinan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add role user
parent
e3d90af5
Pipeline
#402
failed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
AuthService.kt
.../id/go/kemenag/madrasah/pmrms/auth/service/AuthService.kt
+7
-1
No files found.
src/main/kotlin/id/go/kemenag/madrasah/pmrms/auth/service/AuthService.kt
View file @
aff05d4f
...
...
@@ -7,8 +7,10 @@ import com.fasterxml.jackson.databind.ObjectMapper
import
id.go.kemenag.madrasah.pmrms.auth.constant.EXPIRATION_TIME
import
id.go.kemenag.madrasah.pmrms.auth.constant.SECRET
import
id.go.kemenag.madrasah.pmrms.auth.constant.TOKEN_PREFIX
import
id.go.kemenag.madrasah.pmrms.auth.constant.VALIDATOR_MSG_NOT_FOUND
import
id.go.kemenag.madrasah.pmrms.auth.exception.BadRequestException
import
id.go.kemenag.madrasah.pmrms.auth.helpers.getUserLogin
import
id.go.kemenag.madrasah.pmrms.auth.helpers.responseNotFound
import
id.go.kemenag.madrasah.pmrms.auth.helpers.responseSuccess
import
id.go.kemenag.madrasah.pmrms.auth.model.request.auth.LoginRequest
import
id.go.kemenag.madrasah.pmrms.auth.model.response.ReturnData
...
...
@@ -66,7 +68,11 @@ class AuthService {
fun
detail
():
ResponseEntity
<
ReturnData
>
{
return
try
{
responseSuccess
(
data
=
repoUser
.
findByIdAndActive
(
getUserLogin
()
?.
id
))
val
data
=
repoUser
.
findByIdAndActive
(
getUserLogin
()
?.
id
)
if
(
data
.
isPresent
)
{
responseSuccess
(
data
=
data
)
}
responseNotFound
(
"User $VALIDATOR_MSG_NOT_FOUND\""
)
}
catch
(
e
:
Exception
)
{
throw
e
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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