Skip to content

Commit 8255f61

Browse files
committed
fixed the method creation so there is multiple rpc endpoints
2 parents 6e7ec8b + 34eec95 commit 8255f61

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/grpc.server.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ export class GrpcServer extends Context implements Server {
100100
// tslint:disable-next-line:no-any
101101
const serviceMeta = pkgMeta[config.SERVICE_NAME] as any;
102102
// tslint:disable-next-line:no-any
103-
const serviceDef: grpc.ServiceDefinition<any> = serviceMeta.service;
103+
const serviceDef: grpc.ServiceDefinition<any> =
104+
{ [methodName]: serviceMeta.service[methodName] };
104105
this.server.addService(serviceDef, {
105106
[config.METHOD_NAME]: this.setupGrpcCall(ctor, methodName, config),
106107
});

0 commit comments

Comments
 (0)