diff options
author | vlad <vlad@drivergrp.com> | 2016-07-19 15:01:30 -0400 |
---|---|---|
committer | vlad <vlad@drivergrp.com> | 2016-07-19 15:01:30 -0400 |
commit | 979ff9e765e3c08501cbd00354a87013853fe796 (patch) | |
tree | c5d41ed99759c3bf97ba4ef9162aeb68ed4c29f8 /src/main/scala/com/drivergrp/core/rest.scala | |
parent | 8d45c2ec5e8abc63046c610109471cc3fa7bfaa2 (diff) | |
download | driver-core-979ff9e765e3c08501cbd00354a87013853fe796.tar.gz driver-core-979ff9e765e3c08501cbd00354a87013853fe796.tar.bz2 driver-core-979ff9e765e3c08501cbd00354a87013853fe796.zip |
Unit tests for core code and bug fixes
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) } } |