Skip to content

Commit

Permalink
Set selected role
Browse files Browse the repository at this point in the history
  • Loading branch information
HarunErgen committed Nov 27, 2023
1 parent e2cf714 commit 20d7d26
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ class ResqService(appContext: Context) {
suspend fun createResource(request: CreateResourceRequestBody): Response<Int> {
val userId = userSessionManager.getUserId()
val token = userSessionManager.getUserToken() ?: ""
val selectedRole = userSessionManager.getSelectedRole() ?: ""
// val selectedRole = userSessionManager.getSelectedRole() ?: ""

request.senderId = userId

return resourceService.createResource(
jwtToken = "Bearer $token",
role = selectedRole,
role = "RESPONDER",
requestBody = request
)
}
Expand All @@ -104,12 +104,12 @@ class ResqService(appContext: Context) {
suspend fun createNeed(request: CreateNeedRequestBody): Response<Int> {
val userId = userSessionManager.getUserId()
val token = userSessionManager.getUserToken() ?: ""
val selectedRole = userSessionManager.getSelectedRole() ?: ""
// val selectedRole = userSessionManager.getSelectedRole() ?: ""

return needService.createNeed(
userId = userId,
jwtToken = "Bearer $token",
role = selectedRole,
role = "VICTIM",
requestBody = request
)
}
Expand Down

0 comments on commit 20d7d26

Please sign in to comment.