From 979ff9e765e3c08501cbd00354a87013853fe796 Mon Sep 17 00:00:00 2001 From: vlad Date: Tue, 19 Jul 2016 15:01:30 -0400 Subject: Unit tests for core code and bug fixes --- src/main/scala/com/drivergrp/core/rest.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/scala/com/drivergrp/core/rest.scala') 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) } } -- cgit v1.2.3