Skip to content

Commit

Permalink
Add Endpoint#implementAsZIO (#3085)
Browse files Browse the repository at this point in the history
  • Loading branch information
987Nabil authored Sep 5, 2024
1 parent 8074422 commit 825ef5d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ final case class Endpoint[PathInput, Input, Err, Output, Auth <: AuthType](
): Route[Any, Nothing] =
implementHandler[Any](Handler.succeed(output))

def implementAsZIO(output: ZIO[Any, Err, Output])(implicit
trace: Trace,
): Route[Any, Nothing] =
implementHandler[Any](Handler.fromZIO(output))

def implementAsError(err: Err)(implicit
trace: Trace,
): Route[Any, Nothing] =
Expand Down

0 comments on commit 825ef5d

Please sign in to comment.