diff options
author | Zach Smith <zach@driver.xyz> | 2018-03-20 14:59:01 -0700 |
---|---|---|
committer | Zach Smith <zach@driver.xyz> | 2018-03-20 14:59:01 -0700 |
commit | 424e025f1c719006fe6a6669e43667e1d39ff076 (patch) | |
tree | d195616cca72ef37c98d85d6440e234cb19c6b4c /src/main/scala/xyz/driver/core/rest/PatchSupport.scala | |
parent | dd25ecb1e5cc93bd2da94f4e4bfddc9d3a5ebb5e (diff) | |
download | driver-core-424e025f1c719006fe6a6669e43667e1d39ff076.tar.gz driver-core-424e025f1c719006fe6a6669e43667e1d39ff076.tar.bz2 driver-core-424e025f1c719006fe6a6669e43667e1d39ff076.zip |
Curry the PatchRetrievable apply method
Diffstat (limited to 'src/main/scala/xyz/driver/core/rest/PatchSupport.scala')
-rw-r--r-- | src/main/scala/xyz/driver/core/rest/PatchSupport.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/xyz/driver/core/rest/PatchSupport.scala b/src/main/scala/xyz/driver/core/rest/PatchSupport.scala index 5ded61f..d7c77c8 100644 --- a/src/main/scala/xyz/driver/core/rest/PatchSupport.scala +++ b/src/main/scala/xyz/driver/core/rest/PatchSupport.scala @@ -19,9 +19,9 @@ trait PatchSupport extends Directives with SprayJsonSupport { } object PatchRetrievable { - def apply[T](retriever: ((Id[T], ServiceRequestContext) => Future[Option[T]])): PatchRetrievable[T] = + def apply[T](retriever: (Id[T] => (ServiceRequestContext => Future[Option[T]]))): PatchRetrievable[T] = new PatchRetrievable[T] { - override def apply(id: Id[T])(implicit ctx: ServiceRequestContext): Future[Option[T]] = retriever(id, ctx) + override def apply(id: Id[T])(implicit ctx: ServiceRequestContext): Future[Option[T]] = retriever(id)(ctx) } } |