Skip to content

Commit

Permalink
add response strings just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
siers committed Jun 6, 2024
1 parent 7eb8891 commit 96999d6
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ final case class ManagementRoutes(

private val createHealthResponse: UIO[(HealthResponse, StatusCode)] =
state.getAppState.map { s =>
val response = HealthResponse.from(s)
(response, if (response.status) StatusCode.Ok else StatusCode.ServiceUnavailable)
(HealthResponse.from(s), if (response.status) StatusCode.Ok else StatusCode.ServiceUnavailable)
}

private val startCompactionHandler =
Expand All @@ -129,7 +128,7 @@ final case class ManagementRoutes(
for {
_ <- auth.ensureSystemAdmin(user)
success <- triplestore.compact()
} yield ("", if (success) StatusCode.Ok else StatusCode.Forbidden),
} yield if (success) ("ok", StatusCode.Ok) else ("forbidden", StatusCode.Forbidden),
)

val routes = (
Expand Down

0 comments on commit 96999d6

Please sign in to comment.