This commit is contained in:
2026-10-02 23:36:54 +07:00
parent 9419df9ced
commit b723a55e12
4 changed files with 31 additions and 27 deletions
+3 -4
View File
@@ -17,7 +17,6 @@ import (
"time"
"evening_detective_server/internal/modules/storytelling"
"evening_detective_server/internal/repos"
)
// Лимиты на входящие архивы (защита от zip-bomb). Суммарный объём считается
@@ -63,7 +62,7 @@ func ImagePath(ref, domain string) (string, bool) {
// URL остаются без изменений. Архив детерминирован (порядок записей и метки).
func (a *scenarioArchive) Pack(
ctx context.Context,
scenario *repos.Scenario,
scenario *Scenario,
domain string,
getFile func(ctx context.Context, name string) ([]byte, error),
) ([]byte, error) {
@@ -72,8 +71,8 @@ func (a *scenarioArchive) Pack(
}
story := &storytelling.Story{}
if scenario.Scenario != "" {
if err := json.Unmarshal([]byte(scenario.Scenario), story); err != nil {
if scenario.Story != "" {
if err := json.Unmarshal([]byte(scenario.Story), story); err != nil {
return nil, fmt.Errorf("не удалось разобрать историю сценария: %w", err)
}
}