From 34eec958130682359d7c763451d8c49da593a799 Mon Sep 17 00:00:00 2001 From: Simon Liang Date: Mon, 29 Oct 2018 16:18:30 +0800 Subject: [PATCH] fixed the method creation so there is multiple rpc endpoints --- src/grpc.server.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/grpc.server.ts b/src/grpc.server.ts index cdeac4a..7f5b26e 100644 --- a/src/grpc.server.ts +++ b/src/grpc.server.ts @@ -100,7 +100,8 @@ export class GrpcServer extends Context implements Server { // tslint:disable-next-line:no-any const serviceMeta = pkgMeta[config.SERVICE_NAME] as any; // tslint:disable-next-line:no-any - const serviceDef: grpc.ServiceDefinition = serviceMeta.service; + const serviceDef: grpc.ServiceDefinition = + { [methodName]: serviceMeta.service[methodName] }; this.server.addService(serviceDef, { [config.METHOD_NAME]: this.setupGrpcCall(ctor, methodName, config), });