From 27d0932c0a646b9fed614a2fe132d1a64f93d40b Mon Sep 17 00:00:00 2001 From: Shwetank Date: Mon, 31 Aug 2020 14:12:46 -0700 Subject: [PATCH] Fix the template for generating RouterUsingActions --- .../twirl/templates/PlayScala/RouterUsingActions.scala.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/play-generators/src/main/twirl/templates/PlayScala/RouterUsingActions.scala.txt b/play-generators/src/main/twirl/templates/PlayScala/RouterUsingActions.scala.txt index 85878fa5..b30e9126 100644 --- a/play-generators/src/main/twirl/templates/PlayScala/RouterUsingActions.scala.txt +++ b/play-generators/src/main/twirl/templates/PlayScala/RouterUsingActions.scala.txt @@ -8,7 +8,7 @@ package @service.packageName import akka.annotation.InternalApi import akka.actor.ActorSystem -import akka.grpc.GrpcServiceException +import akka.grpc.{GrpcServiceException, Trailers} import play.grpc.internal.PlayRouterUsingActions import akka.grpc.scaladsl.GrpcExceptionHandler.defaultMapper import akka.http.scaladsl.model.Uri.Path @@ -23,7 +23,7 @@ import scala.concurrent.ExecutionContext /** * Abstract base class for implementing @{serviceName} and using as a play Router */ - abstract class Abstract@{serviceName}Router(mat: Materializer, system: ActorSystem, parsers: PlayBodyParsers, actionBuilder: ActionBuilder[Request, AnyContent], eHandler: ActorSystem => PartialFunction[Throwable, Status] = defaultMapper) extends PlayRouterUsingActions(mat, @{service.name}.name, parsers, actionBuilder) with @{serviceName} { + abstract class Abstract@{serviceName}Router(mat: Materializer, system: ActorSystem, parsers: PlayBodyParsers, actionBuilder: ActionBuilder[Request, AnyContent], eHandler: ActorSystem => PartialFunction[Throwable, Trailers] = defaultMapper) extends PlayRouterUsingActions(mat, @{service.name}.name, parsers, actionBuilder) with @{serviceName} { @{ val (streamingInputMethods: Seq[String], unaryInputMethods: Seq[String]) = service.methods.partition(_.inputStreaming) match { @@ -37,7 +37,7 @@ import scala.concurrent.ExecutionContext */ @@InternalApi final override protected def createHandler(serviceName: String, mat: Materializer): RequestHeader => EssentialAction = { - val handler = @{serviceName}Handler(this, serviceName, eHandler)(mat, system) + val handler = @{serviceName}Handler(this, serviceName, eHandler)(system) reqOuter => implicit val ec: ExecutionContext = mat.executionContext Path(reqOuter.path) match {