Skip to content

Commit

Permalink
feat(rpc/handler): make message public field
Browse files Browse the repository at this point in the history
  • Loading branch information
CheerlessCloud committed Sep 24, 2018
1 parent 7cfa8be commit 88865fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/IRpcServiceHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import RpcService from './Service';

export interface IRpcServiceHandler {
+action: string;
+message: IMessage;
constructor({ service: RpcService, message: IMessage }): IRpcServiceHandler;
beforeHandle(): Promise<void> | void;
handle(): Promise<void> | void;
Expand Down
4 changes: 2 additions & 2 deletions src/RpcServiceHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ export default class RpcServiceHandler implements IRpcServiceHandler {
// +required: string[] = [];

+_service: RpcService;
+_message: IMessage;
+message: IMessage;
+payload: Object;

constructor({ service, message }: { service: RpcService, message: IMessage }): RpcServiceHandler {
this._service = service;
this._message = message;
this.message = message;
this.payload = message.payload;
return this;
}
Expand Down

0 comments on commit 88865fe

Please sign in to comment.