Advertisement
Guest User

Untitled

a guest
May 29th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.39 KB | None | 0 0
  1. def SupplierGetRoute = path("supplier" / IntNumber) { (supId)      =>
  2.     get {
  3.       respondWithMediaType(`application/json`) {
  4.         onComplete((modules.suppliersDAA ? GetSupplierById(supId)).mapTo[Future[Seq[Supplier]]]) {
  5.           case Success(s) => complete(s)
  6.           case Failure(ex) => complete(InternalServerError, s"An error occurred: ${ex.getMessage}")
  7.         }
  8.       }
  9.     }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement