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