diff --git a/Client/Content/TurboLinkTest/UI/WBP_UserService_BP.uasset b/Client/Content/TurboLinkTest/UI/WBP_UserService_BP.uasset index f73ca4b..b50269c 100644 Binary files a/Client/Content/TurboLinkTest/UI/WBP_UserService_BP.uasset and b/Client/Content/TurboLinkTest/UI/WBP_UserService_BP.uasset differ diff --git a/Common/proto/common.proto b/Common/proto/common.proto index 528a3ba..c71e4c6 100644 --- a/Common/proto/common.proto +++ b/Common/proto/common.proto @@ -7,3 +7,8 @@ enum Gender { Male=0; Female=1; } + +message RegisterResponse { + uint64 id = 1; + string msg = 2; +} diff --git a/Common/proto/user.proto b/Common/proto/user.proto index cf8a7c3..27374ca 100644 --- a/Common/proto/user.proto +++ b/Common/proto/user.proto @@ -16,11 +16,6 @@ message RegisterRequest { } } -message RegisterResponse { - uint64 id = 1; - string msg = 2; -} - message QueryRequest { uint64 id = 1; } @@ -31,6 +26,6 @@ message QueryResponse { } service UserService { - rpc Register (RegisterRequest) returns (RegisterResponse); + rpc Register (RegisterRequest) returns (Common.RegisterResponse); rpc Query(QueryRequest) returns(QueryResponse); } diff --git a/Server/services/user_server.go b/Server/services/user_server.go index e0be4da..7c2646e 100644 --- a/Server/services/user_server.go +++ b/Server/services/user_server.go @@ -28,7 +28,7 @@ type UserServer struct { UserArray []*UserData } -func (s *UserServer) Register(ctx context.Context, in *User.RegisterRequest) (*User.RegisterResponse, error) { +func (s *UserServer) Register(ctx context.Context, in *User.RegisterRequest) (*Common.RegisterResponse, error) { userData := &UserData{Id:len(s.UserArray), Name:in.Name, Gender:in.Gender} userData.Addresses = make([]*UserAddress, 0) for i:=0; i