Skip to content

Commit

Permalink
style: properly ident the either folding
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorhugods committed Oct 24, 2023
1 parent 224f3e5 commit ccad405
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,17 @@ class SessionManagerImpl internal constructor(
override suspend fun session(): SessionDTO = withContext(coroutineContext) {
wrapStorageRequest { tokenStorage.getToken(userId.toDao()) }
.map { sessionMapper.fromEntityToSessionDTO(it) }
.fold({
error(
"""SESSION MANAGER:
.fold(
{
error(
"""SESSION MANAGER:
|"error": "missing user session",
|"cause": "$it" """.trimMargin()
)
}, { session ->
kaliumLogger.i("_TOKEN_ FOUND SESSION = $session")
session
}
)
}, { session ->
kaliumLogger.i("_TOKEN_ FOUND SESSION = $session")
session
}
)
}

Expand Down

0 comments on commit ccad405

Please sign in to comment.