diff options
Diffstat (limited to 'src/main/scala/com/drivergrp/core/rest.scala')
-rw-r--r-- | src/main/scala/com/drivergrp/core/rest.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/com/drivergrp/core/rest.scala b/src/main/scala/com/drivergrp/core/rest.scala index adbf716..b7edc5b 100644 --- a/src/main/scala/com/drivergrp/core/rest.scala +++ b/src/main/scala/com/drivergrp/core/rest.scala @@ -121,11 +121,11 @@ object rest { /** * "Unwraps" a `OptionT[Future, T]` and runs the inner route after future * completion with the future's value as an extraction of type `Try[T]`. + * Copied akka-http code with added `.run` call on `OptionT`. */ def onComplete[T](optionT: OptionT[Future, T]): Directive1[Try[Option[T]]] = Directive { inner ⇒ ctx ⇒ - import ctx.executionContext - optionT.run.fast.transformWith(t ⇒ inner(Tuple1(t))(ctx)) + optionT.run.fast.transformWith(t ⇒ inner(Tuple1(t))(ctx))(ctx.executionContext) } } |