aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestHypothesisService.scala
diff options
context:
space:
mode:
authorKseniya Tomskikh <ktomskih@datamonsters.co>2017-10-20 16:25:04 +0700
committerKseniya Tomskikh <ktomskih@datamonsters.co>2017-10-20 16:25:04 +0700
commit54b15dae509212f6661dc1f1bc4ca248cb487443 (patch)
tree85b1ceafd9a56da511513797bd263977f52b556c /src/main/scala/xyz/driver/pdsuidomain/services/rest/RestHypothesisService.scala
parent6d6e732368e97e319653f00e498189afceeb4671 (diff)
downloadrest-query-54b15dae509212f6661dc1f1bc4ca248cb487443.tar.gz
rest-query-54b15dae509212f6661dc1f1bc4ca248cb487443.tar.bz2
rest-query-54b15dae509212f6661dc1f1bc4ca248cb487443.zip
PDSUI-2336 Deleted api classes of play format, userhistory and message services
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/services/rest/RestHypothesisService.scala')
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/services/rest/RestHypothesisService.scala13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestHypothesisService.scala b/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestHypothesisService.scala
index 1b8c943..a352053 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestHypothesisService.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestHypothesisService.scala
@@ -1,14 +1,13 @@
package xyz.driver.pdsuidomain.services.rest
import scala.concurrent.{ExecutionContext, Future}
-
import akka.http.scaladsl.model._
import akka.stream.Materializer
import xyz.driver.core.rest._
import xyz.driver.pdsuicommon.auth._
import xyz.driver.pdsuicommon.db._
-import xyz.driver.pdsuidomain.formats.json.ListResponse
-import xyz.driver.pdsuidomain.formats.json.hypothesis.ApiHypothesis
+import xyz.driver.pdsuidomain.ListResponse
+import xyz.driver.pdsuidomain.entities.Hypothesis
import xyz.driver.pdsuidomain.services.HypothesisService
class RestHypothesisService(transport: ServiceTransport, baseUri: Uri)(
@@ -16,7 +15,9 @@ class RestHypothesisService(transport: ServiceTransport, baseUri: Uri)(
protected val exec: ExecutionContext)
extends HypothesisService with RestHelper {
- import xyz.driver.pdsuicommon.serialization.PlayJsonSupport._
+ import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._
+ import xyz.driver.pdsuidomain.formats.json.listresponse._
+ import xyz.driver.pdsuidomain.formats.json.hypothesis._
import xyz.driver.pdsuidomain.services.HypothesisService._
def getAll(sorting: Option[Sorting] = None)(
@@ -24,9 +25,9 @@ class RestHypothesisService(transport: ServiceTransport, baseUri: Uri)(
val request = HttpRequest(HttpMethods.GET, endpointUri(baseUri, "/v1/hypothesis", sortingQuery(sorting)))
for {
response <- transport.sendRequestGetResponse(requestContext)(request)
- reply <- apiResponse[ListResponse[ApiHypothesis]](response)
+ reply <- apiResponse[ListResponse[Hypothesis]](response)
} yield {
- GetListReply.EntityList(reply.items.map(_.toDomain), reply.meta.itemsCount)
+ GetListReply.EntityList(reply.items, reply.meta.itemsCount)
}
}