aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Odersky <jakob@driver.xyz>2017-10-20 15:52:07 -0700
committerJakob Odersky <jakob@driver.xyz>2017-10-20 15:52:07 -0700
commitd1537fa8bbf7c7097fe7ddb410e40c82381d79f2 (patch)
treebb2db32e6845ea7f9cfe9627c9caffe9acb87c42
parent2ebb8f0a91f57259297f7ef1128d8d07e3146621 (diff)
downloadrest-query-d1537fa8bbf7c7097fe7ddb410e40c82381d79f2.tar.gz
rest-query-d1537fa8bbf7c7097fe7ddb410e40c82381d79f2.tar.bz2
rest-query-d1537fa8bbf7c7097fe7ddb410e40c82381d79f2.zip
Use core rejection handler
-rw-r--r--build.sbt2
-rw-r--r--src/main/scala/xyz/driver/pdsuicommon/http/Directives.scala3
2 files changed, 3 insertions, 2 deletions
diff --git a/build.sbt b/build.sbt
index d68a8f5..e9613ab 100644
--- a/build.sbt
+++ b/build.sbt
@@ -18,7 +18,7 @@ lazy val core = (project in file("."))
"io.github.cloudify" %% "spdf" % "1.4.0",
"org.davidbild" %% "tristate-core" % "0.2.0",
"org.davidbild" %% "tristate-play" % "0.2.0" exclude ("com.typesafe.play", "play-json"),
- "xyz.driver" %% "core" % "1.2.2",
+ "xyz.driver" %% "core" % "1.2.3",
"xyz.driver" %% "domain-model" % "0.17.8",
"ch.qos.logback" % "logback-classic" % "1.1.7",
"com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.8.4",
diff --git a/src/main/scala/xyz/driver/pdsuicommon/http/Directives.scala b/src/main/scala/xyz/driver/pdsuicommon/http/Directives.scala
index e9a4132..67da717 100644
--- a/src/main/scala/xyz/driver/pdsuicommon/http/Directives.scala
+++ b/src/main/scala/xyz/driver/pdsuicommon/http/Directives.scala
@@ -3,6 +3,7 @@ package xyz.driver.pdsuicommon.http
import akka.http.scaladsl.server._
import akka.http.scaladsl.server.Directives._
import akka.http.scaladsl.model._
+import xyz.driver.core.app.DriverApp
import xyz.driver.core.rest.ContextHeaders
import xyz.driver.entities.users.AuthUserInfo
import xyz.driver.pdsuicommon.auth._
@@ -88,7 +89,7 @@ trait Directives {
val text = Json.stringify(implicitly[Writes[ErrorsResponse]].writes(err))
HttpEntity(ContentTypes.`application/json`, text)
}
- RejectionHandler.default.mapRejectionResponse {
+ DriverApp.rejectionHandler.mapRejectionResponse {
case res @ HttpResponse(_, _, ent: HttpEntity.Strict, _) =>
res.copy(entity = wrapContent(ent.data.utf8String))
case x => x // pass through all other types of responses