Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
fix(zio): update code to new RC3 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JesusMtnez committed Oct 27, 2023
1 parent ff1f9e0 commit c6460f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ object TodoBackendApp extends ZIOAppDefault:

override val run =
Server
.serve(routes @@ RequestHandlerMiddlewares.debug)
.serve(routes.toHttpApp @@ Middleware.debug)
.provide(Server.default)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import zio._
import zio.http._

object TodoBackendRoutes:
val about: HttpApp[Any, Nothing] = Http.collect[Request]:
case Method.GET -> Root / "about" => Response.text(BuildInfo.toString)
val about: Routes[Any, Nothing] = Routes(
Method.GET / "about" -> Handler.from(Response.text(BuildInfo.toString))
)

val todo: HttpApp[Any, Nothing] = Http.empty
val todo: Routes[Any, Nothing] = Routes.empty

0 comments on commit c6460f2

Please sign in to comment.