diff options
author | Aleksandr <ognelisar@gmail.com> | 2017-09-29 13:39:46 +0700 |
---|---|---|
committer | Aleksandr <ognelisar@gmail.com> | 2017-09-29 13:39:46 +0700 |
commit | d4d7a173ba57e9fc9756b47223ee70fbc03a23b9 (patch) | |
tree | f645e94b71a5ed8e942a5304505b2af7219963e4 /src/main/scala/xyz/driver/pdsuidomain/services/rest | |
parent | b7dfa70fdc49d0a47f8628139baebf27ad2ea746 (diff) | |
parent | deba20326e3269fee3ef51f8e6841f17453b4155 (diff) | |
download | rest-query-d4d7a173ba57e9fc9756b47223ee70fbc03a23b9.tar.gz rest-query-d4d7a173ba57e9fc9756b47223ee70fbc03a23b9.tar.bz2 rest-query-d4d7a173ba57e9fc9756b47223ee70fbc03a23b9.zip |
Merge branch 'master' of ssh://github.com/drivergroup/pds-ui-common into PDSUI-rep-fixtures
Diffstat (limited to 'src/main/scala/xyz/driver/pdsuidomain/services/rest')
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/services/rest/RestExtractedDataService.scala | 9 | ||||
-rw-r--r-- | src/main/scala/xyz/driver/pdsuidomain/services/rest/RestTrialService.scala | 8 |
2 files changed, 10 insertions, 7 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestExtractedDataService.scala b/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestExtractedDataService.scala index 53b9f38..a65e1f4 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestExtractedDataService.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestExtractedDataService.scala @@ -1,7 +1,6 @@ package xyz.driver.pdsuidomain.services.rest import scala.concurrent.{ExecutionContext, Future} - import akka.http.scaladsl.marshalling.Marshal import akka.http.scaladsl.model._ import akka.stream.Materializer @@ -10,10 +9,12 @@ import xyz.driver.pdsuicommon.auth._ import xyz.driver.pdsuicommon.db._ import xyz.driver.pdsuicommon.domain._ import xyz.driver.pdsuidomain.entities._ +import xyz.driver.pdsuidomain.entities.export.patient.ExportPatientWithLabels import xyz.driver.pdsuidomain.formats.json.ListResponse -import xyz.driver.pdsuidomain.formats.json.export.ApiExportPatientWithLabels import xyz.driver.pdsuidomain.formats.json.extracteddata.ApiExtractedData import xyz.driver.pdsuidomain.services.ExtractedDataService +import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ +import xyz.driver.pdsuidomain.formats.json.sprayformats.export._ class RestExtractedDataService(transport: ServiceTransport, baseUri: Uri)( implicit protected val materializer: Materializer, @@ -88,9 +89,9 @@ class RestExtractedDataService(transport: ServiceTransport, baseUri: Uri)( val request = HttpRequest(HttpMethods.GET, endpointUri(baseUri, s"/v1/export/patient/$id")) for { response <- transport.sendRequestGetResponse(requestContext)(request) - reply <- apiResponse[ApiExportPatientWithLabels](response) + reply <- apiResponse[ExportPatientWithLabels](response) } yield { - GetPatientLabelsReply.Entity(reply.toDomain) + GetPatientLabelsReply.Entity(reply) } } diff --git a/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestTrialService.scala b/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestTrialService.scala index b77e6df..7e33919 100644 --- a/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestTrialService.scala +++ b/src/main/scala/xyz/driver/pdsuidomain/services/rest/RestTrialService.scala @@ -12,10 +12,12 @@ import xyz.driver.pdsuicommon.auth._ import xyz.driver.pdsuicommon.db._ import xyz.driver.pdsuicommon.domain._ import xyz.driver.pdsuidomain.entities._ +import xyz.driver.pdsuidomain.entities.export.trial.ExportTrialWithLabels import xyz.driver.pdsuidomain.formats.json.ListResponse -import xyz.driver.pdsuidomain.formats.json.export.ApiExportTrialWithLabels import xyz.driver.pdsuidomain.formats.json.trial.ApiTrial import xyz.driver.pdsuidomain.services.TrialService +import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ +import xyz.driver.pdsuidomain.formats.json.sprayformats.export._ class RestTrialService(transport: ServiceTransport, baseUri: Uri)(implicit protected val materializer: Materializer, protected val exec: ExecutionContext) @@ -39,9 +41,9 @@ class RestTrialService(transport: ServiceTransport, baseUri: Uri)(implicit prote val request = HttpRequest(HttpMethods.GET, endpointUri(baseUri, s"/v1/export/trial/$disease/$trialId")) for { response <- transport.sendRequestGetResponse(requestContext)(request) - reply <- apiResponse[ApiExportTrialWithLabels](response) + reply <- apiResponse[ExportTrialWithLabels](response) } yield { - GetTrialWithLabelsReply.Entity(reply.toDomain) + GetTrialWithLabelsReply.Entity(reply) } } |