generated from VLADIMIR/template
up
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user