Commit e8877270 authored by Ghitha Dinan's avatar Ghitha Dinan

add role user

parent aff05d4f
...@@ -67,12 +67,12 @@ class AuthService { ...@@ -67,12 +67,12 @@ class AuthService {
} }
fun detail(): ResponseEntity<ReturnData> { fun detail(): ResponseEntity<ReturnData> {
return try { try {
val data = repoUser.findByIdAndActive(getUserLogin()?.id) val data = repoUser.findByIdAndActive(getUserLogin()?.id)
if (data.isPresent) { if (data.isPresent) {
responseSuccess(data = data) return responseSuccess(data = data.get())
} }
responseNotFound("User $VALIDATOR_MSG_NOT_FOUND\"") return responseNotFound("User $VALIDATOR_MSG_NOT_FOUND")
} catch (e: Exception) { } catch (e: Exception) {
throw e throw e
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment