add games

This commit is contained in:
2026-07-28 00:02:11 +07:00
parent 10b3d450e9
commit 65763a3e10
3 changed files with 9 additions and 1 deletions
@@ -174,6 +174,15 @@ func (s *ScenarioService) updateStory(ctx context.Context, id int, story *storyt
return errors.New("Такой код точки уже существует")
}
cleanPlaces := make([]*storytelling.Place, 0, len(story.Places))
for _, place := range story.Places {
if place.Code == "" {
continue
}
cleanPlaces = append(cleanPlaces, place)
}
story.Places = cleanPlaces
storyString, err := convertStory(story)
if err != nil {
return err