Skip to content

Commit

Permalink
fix: group methods
Browse files Browse the repository at this point in the history
  • Loading branch information
bookpanda committed Jul 6, 2024
1 parent efcfb81 commit 48a2ea1
Showing 1 changed file with 13 additions and 24 deletions.
37 changes: 13 additions & 24 deletions rpkm67/backend/group/v1/group.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ package rpkm67.backend.group.v1;
option go_package = "rpkm67/backend/group/v1";

service GroupService {
rpc FindOne(FindOneGroupRequest) returns (FindOneGroupResponse) {}
rpc FindByUserId(FindByUserIdGroupRequest) returns (FindByUserIdGroupResponse) {}
rpc FindByToken(FindByTokenGroupRequest) returns (FindByTokenGroupResponse) {}
rpc Update(UpdateGroupRequest) returns (UpdateGroupResponse) {}
rpc UpdateConfirm(UpdateConfirmGroupRequest) returns (UpdateConfirmGroupResponse) {}
rpc Join(JoinGroupRequest) returns (JoinGroupResponse) {}
rpc DeleteMember(DeleteMemberGroupRequest) returns (DeleteMemberGroupResponse){}
rpc Leave(LeaveGroupRequest) returns (LeaveGroupResponse){}
rpc ConfirmSelection(ConfirmSelectionGroupRequest) returns (ConfirmSelectionGroupResponse){}
}

message Group{
Expand All @@ -29,16 +28,16 @@ message UserInfo {
string imageUrl = 4;
}

//Find One
message FindOneGroupRequest{
// FindByUserId
message FindByUserIdGroupRequest{
string userId = 1;
}

message FindOneGroupResponse{
message FindByUserIdGroupResponse{
Group group = 1;
}

// Find By Token
// FindByToken
message FindByTokenGroupRequest{
string token = 1;
}
Expand All @@ -49,17 +48,16 @@ message FindByTokenGroupResponse{
UserInfo leader = 3;
}

// Update
message UpdateGroupRequest{
Group group = 1;
string leaderId = 2;
// Update IsConfirmed
message UpdateConfirmGroupRequest{
string userId = 1;
}

message UpdateGroupResponse{
message UpdateConfirmGroupResponse{
Group group = 1;
}

//Join
// Add new member to group
message JoinGroupRequest{
string token = 1;
string userId = 2;
Expand All @@ -69,7 +67,7 @@ message JoinGroupResponse{
Group group = 1;
}

// Delete
// Delete member from group
message DeleteMemberGroupRequest{
string userId = 1;
string leaderId = 2;
Expand All @@ -79,20 +77,11 @@ message DeleteMemberGroupResponse{
Group group = 1;
}

// Leave
// Leave group
message LeaveGroupRequest{
string userId = 1;
}

message LeaveGroupResponse{
Group group = 1;
}

// Confirm Selection
message ConfirmSelectionGroupRequest{
string userId = 1;
}

message ConfirmSelectionGroupResponse{
bool success = 1;
}

0 comments on commit 48a2ea1

Please sign in to comment.