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
2 parents 6e7ec8b + 34eec95 commit 365e94b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
<<<<<<< HEAD
"name": "@loopback/grpc",
"version": "1.0.1",
=======
"name": "@xanthous/loopback4-extension-grpc",
"version": "1.0.5",
>>>>>>> streaming-calls
"description": "A gRPC extencion for LoopBack Next",
"main": "index.js",
"engines": {
Expand Down
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 365e94b

Please sign in to comment.