Skip to content

Commit

Permalink
Don't use infix style in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitrii Kostianoi committed Feb 17, 2018
1 parent 50630c2 commit a0aeead
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -45,15 +45,15 @@ class RestService[F[+_]: Monad](val businessLayer: BusinessLayer) extends RhoSer
Ok(b.build())
}

found getOrElse NotFound(warning(s"Browser $id not found"))
found.getOrElse(NotFound(warning(s"Browser $id not found")))
}

val browserPatternsById = browsers / id / "patterns"
GET / browserPatternsById |>> { (request: Request[F], id: Int) =>
val found = for { patterns <- businessLayer.findBrowserPatternsByBrowserId(id) }
yield Ok(browserPatternsAsResource(request, 0, Int.MaxValue, patterns, patterns.size).build())

found getOrElse NotFound(warning(s"Browser $id not found"))
found.getOrElse(NotFound(warning(s"Browser $id not found")))
}

val browserPatterns = "browser-patterns"
Expand All @@ -77,7 +77,7 @@ class RestService[F[+_]: Monad](val businessLayer: BusinessLayer) extends RhoSer
Ok(b.build())
}

found getOrElse NotFound(warning(s"Browser $id not found"))
found.getOrElse(NotFound(warning(s"Browser $id not found")))
}

val browserTypes = "browser-types"
Expand All @@ -99,7 +99,7 @@ class RestService[F[+_]: Monad](val businessLayer: BusinessLayer) extends RhoSer
Ok(b.build())
}

found getOrElse NotFound(warning(s"Browser type $id not found"))
found.getOrElse(NotFound(warning(s"Browser type $id not found")))
}

val browsersByBrowserTypeId = browserTypes / id / "browsers"
Expand Down Expand Up @@ -133,7 +133,7 @@ class RestService[F[+_]: Monad](val businessLayer: BusinessLayer) extends RhoSer
Ok(b.build())
}

found getOrElse NotFound(warning(s"OperatingSystem $id not found"))
found.getOrElse(NotFound(warning(s"OperatingSystem $id not found")))
}

val browsersByOperatingSystem = operatingSystemById / "browsers"
Expand Down

0 comments on commit a0aeead

Please sign in to comment.