generated from VLADIMIR/template
add game to team story
This commit is contained in:
@@ -482,7 +482,7 @@ func (s *server) GetGame(ctx context.Context, req *proto.GetGameReq) (*proto.Get
|
||||
return nil, status.Errorf(codes.PermissionDenied, "permission denied")
|
||||
}
|
||||
|
||||
game, err := s.gameService.GetGame(ctx, int(req.Id))
|
||||
game, err := s.gameService.GetFullGame(ctx, int(req.Id))
|
||||
if err != nil {
|
||||
return &proto.GetGameRsp{
|
||||
Error: err.Error(),
|
||||
@@ -634,8 +634,16 @@ func (s *server) GetTeamStory(ctx context.Context, req *proto.GetTeamStoryReq) (
|
||||
}, nil
|
||||
}
|
||||
|
||||
game, err := s.gameService.GetGame(ctx, int(req.Id))
|
||||
if err != nil {
|
||||
return &proto.GetTeamStoryRsp{
|
||||
Error: err.Error(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
return &proto.GetTeamStoryRsp{
|
||||
Story: mapStory(story),
|
||||
Game: mapGame(game),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user