This commit is contained in:
2026-10-03 01:28:09 +07:00
parent 2e1f8e21e9
commit 55d8522f7c
5 changed files with 63 additions and 35 deletions
+4 -12
View File
@@ -105,9 +105,7 @@ func (s *server) GiveTeamApplications(ctx context.Context, req *proto.GiveTeamAp
req.Name,
)
if err != nil {
return &proto.GiveTeamApplicationsRsp{
Error: err.Error(),
}, nil
return nil, gameplayErrorStatus(err, "не удалось обработать заявку команды")
}
return &proto.GiveTeamApplicationsRsp{}, nil
@@ -120,9 +118,7 @@ func (s *server) GetTeamStory(ctx context.Context, req *proto.GetTeamStoryReq) (
req.Password,
)
if err != nil {
return &proto.GetTeamStoryRsp{
Error: err.Error(),
}, nil
return nil, gameplayErrorStatus(err, "не удалось получить историю команды")
}
protoActions := make([]*proto.TeamAction, 0, len(actions))
for _, action := range actions {
@@ -145,9 +141,7 @@ func (s *server) AddTeamAction(ctx context.Context, req *proto.AddTeamActionReq)
false,
)
if err != nil {
return &proto.AddTeamActionRsp{
Error: err.Error(),
}, nil
return nil, gameplayErrorStatus(err, "не удалось добавить действие команды")
}
return &proto.AddTeamActionRsp{}, nil
@@ -167,9 +161,7 @@ func (s *server) DeleteLastTeamAction(ctx context.Context, req *proto.DeleteLast
int(req.ID),
)
if err != nil {
return &proto.DeleteLastTeamActionRsp{
Error: err.Error(),
}, nil
return nil, gameplayErrorStatus(err, "не удалось удалить последнее действие команды")
}
return &proto.DeleteLastTeamActionRsp{}, nil