From bec8e7325fa28c1a850c846f1bab43608b46a943 Mon Sep 17 00:00:00 2001 From: Luke <lugehorsam@gmail.com> Date: Thu, 3 Jun 2021 18:26:09 -0400 Subject: [PATCH] add empty bodies to post methods in apigrpc.proto (#624) * add empty bodies to post methods in apigrpc.proto * add body to promote group users * replace semicolon with comma --- apigrpc/apigrpc.proto | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/apigrpc/apigrpc.proto b/apigrpc/apigrpc.proto index ca729d834..526051465 100644 --- a/apigrpc/apigrpc.proto +++ b/apigrpc/apigrpc.proto @@ -88,12 +88,18 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { service Nakama { // Add friends by ID or username to a user's account. rpc AddFriends (api.AddFriendsRequest) returns (google.protobuf.Empty) { - option (google.api.http).post = "/v2/friend"; + option (google.api.http) = { + post: "/v2/friend", + body: "*" + }; } // Add users to a group. rpc AddGroupUsers (api.AddGroupUsersRequest) returns (google.protobuf.Empty) { - option (google.api.http).post = "/v2/group/{group_id}/add"; + option (google.api.http) = { + post: "/v2/group/{group_id}/add", + body: "*" + }; } // Refresh a user's session using a refresh token retrieved from a previous authentication request. @@ -266,13 +272,17 @@ service Nakama { // Ban a set of users from a group. rpc BanGroupUsers (api.BanGroupUsersRequest) returns (google.protobuf.Empty) { - option (google.api.http).post = "/v2/group/{group_id}/ban"; + option (google.api.http) = { + post = "/v2/group/{group_id}/ban", + body: "*" + }; } // Block one or more users by ID or username. rpc BlockFriends (api.BlockFriendsRequest) returns (google.protobuf.Empty) { option (google.api.http) = { - post: "/v2/friend/block" + post: "/v2/friend/block", + body: "*" }; } @@ -363,7 +373,10 @@ service Nakama { // Kick a set of users from a group. rpc KickGroupUsers (api.KickGroupUsersRequest) returns (google.protobuf.Empty) { - option (google.api.http).post = "/v2/group/{group_id}/kick"; + option (google.api.http) = { + post: "/v2/group/{group_id}/kick", + body: "*" + }; } // Leave a group the user is a member of. @@ -515,12 +528,18 @@ service Nakama { // Promote a set of users in a group to the next role up. rpc PromoteGroupUsers (api.PromoteGroupUsersRequest) returns (google.protobuf.Empty) { - option (google.api.http).post = "/v2/group/{group_id}/promote"; + option (google.api.http) = { + post: "/v2/group/{group_id}/promote", + body: "*" + }; } // Demote a set of users in a group to the next role down. rpc DemoteGroupUsers (api.DemoteGroupUsersRequest) returns (google.protobuf.Empty) { - option (google.api.http).post = "/v2/group/{group_id}/demote"; + option (google.api.http) = { + post: "/v2/group/{group_id}/demote", + body: "*" + }; } // Get storage objects. -- GitLab