Skip to content

Instantly share code, notes, and snippets.

@adamw
Created February 18, 2019 12:49
Show Gist options
  • Save adamw/b0484bbf82f8bf43710b68ff543e45c7 to your computer and use it in GitHub Desktop.
Save adamw/b0484bbf82f8bf43710b68ff543e45c7 to your computer and use it in GitHub Desktop.
def addBookLogic(b: Book, authToken: String): Future[Either[Unit, Boolean]] = ...
val addBook: Endpoint[(Book, String), Unit, Boolean, Nothing] = ...
import tapir.server.akkahttp._
import akka.http.scaladsl.server.Route
val addBookRoute: Route = addBook.toRoute(addBookLogic _)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment