add load applications

This commit is contained in:
2026-08-30 21:17:32 +07:00
parent 3b15fb3a2b
commit c0b5ceb65f
28 changed files with 1536 additions and 139 deletions
@@ -64,6 +64,9 @@ type Application struct {
// Картинка
Image string `json:"image"`
// Тип файла улики: image | pdf | audio.
FileType string `json:"file_type,omitempty"`
}
// Дверь - действие или диалог
+3 -2
View File
@@ -144,8 +144,9 @@ func (s *story) mapPlace(
applications = append(
applications,
&Application{
Name: s.cleaner.ClearText(application.Name),
Image: application.Image,
Name: s.cleaner.ClearText(application.Name),
Image: application.Image,
FileType: application.FileType,
},
)
}
+6 -4
View File
@@ -229,8 +229,9 @@ func Test_story_GetStory(t *testing.T) {
Text: "Текст точки.",
Applications: []*Application{
{
Name: "Название улики",
Image: "image.png",
Name: "Название улики",
Image: "image.png",
FileType: "image",
},
},
},
@@ -245,8 +246,9 @@ func Test_story_GetStory(t *testing.T) {
Text: "Текст точки.",
Applications: []*Application{
{
Name: "Название улики",
Image: "image.png",
Name: "Название улики",
Image: "image.png",
FileType: "image",
},
},
},