This commit is contained in:
2026-10-04 14:48:11 +07:00
parent c663fbb504
commit 494b3fc471
2 changed files with 2 additions and 6 deletions
Binary file not shown.
@@ -60,7 +60,7 @@ func (s *ScreenPlanService) Get(ctx context.Context, gameID int) (*Plan, error)
return mapPlan(stored), nil
}
// Save validates, stores and applies a game's screen plan.
// Save validates and stores a game's screen plan.
func (s *ScreenPlanService) Save(ctx context.Context, gameID int, steps []Step, currentStep int) (*Plan, error) {
steps, err := normalizePlan(steps, currentStep)
if err != nil {
@@ -76,11 +76,7 @@ func (s *ScreenPlanService) Save(ctx context.Context, gameID int, steps []Step,
if err != nil {
return nil, err
}
plan := mapPlan(stored)
if err := s.applyStep(ctx, gameID, plan); err != nil {
return nil, err
}
return plan, nil
return mapPlan(stored), nil
}
// SetStep stores and applies the selected step.