generated from VLADIMIR/template
try fix video urls
This commit is contained in:
Binary file not shown.
@@ -301,7 +301,7 @@ func (s *server) enrichScreenState(ctx context.Context, session *screen_sessions
|
||||
if session.GameID == nil {
|
||||
return
|
||||
}
|
||||
game, err := s.gameService.GetFullGame(ctx, *session.GameID)
|
||||
game, err := s.gameService.GetGameMedia(ctx, *session.GameID)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -89,6 +89,19 @@ func (s *GameService) GetGame(ctx context.Context, id int) (*Game, error) {
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func (s *GameService) GetGameMedia(ctx context.Context, id int) (*Game, error) {
|
||||
game, err := s.gamesRepo.GetGameByID(ctx, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
gameResult := mapGame(game, s.domain)
|
||||
gameResult.Scenario, err = s.scenarioService.GetFullScenarioByID(ctx, game.ScenarioId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return gameResult, nil
|
||||
}
|
||||
|
||||
func (s *GameService) GetFullGame(
|
||||
ctx context.Context,
|
||||
id int,
|
||||
|
||||
Reference in New Issue
Block a user