Skip to content

Commit

Permalink
fixed the method creation so there is multiple rpc endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
lhr0909 committed Oct 29, 2018
1 parent 6379137 commit 34eec95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/grpc.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any> = serviceMeta.service;
const serviceDef: grpc.ServiceDefinition<any> =
{ [methodName]: serviceMeta.service[methodName] };
this.server.addService(serviceDef, {
[config.METHOD_NAME]: this.setupGrpcCall(ctor, methodName, config),
});
Expand Down

0 comments on commit 34eec95

Please sign in to comment.