Skip to content

Commit

Permalink
Fix code remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
dbulaja98 committed Feb 7, 2023
1 parent cc5f5d4 commit 9680527
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/example/src/main/scala/example/api/Repositories.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package example.api
import example.{GitHubRepo, RepositoriesElasticsearch}
import zio.ZIO
import zio.elasticsearch.ElasticQuery.boolQuery
import zio.elasticsearch.{ElasticQuery, _}
import zio.elasticsearch._
import zio.http._
import zio.http.model.Method
import zio.http.model.Status.{
Expand Down Expand Up @@ -100,7 +100,8 @@ object Repositories {
case Right(repo) =>
(RepositoriesElasticsearch
.upsert(id, repo.copy(id = id)) *> RepositoriesElasticsearch.findById(repo.organization, id)).map {
case Some(updated) => Response.json(updated.toJson)
case Some(updated) =>
Response.json(updated.toJson)
case None =>
Response.json(ErrorResponse.fromReasons("Operation failed.").toJson).setStatus(HttpBadRequest)
}
Expand Down

0 comments on commit 9680527

Please sign in to comment.