generated from VLADIMIR/template
add load applications
This commit is contained in:
@@ -64,6 +64,9 @@ type Application struct {
|
||||
|
||||
// Картинка
|
||||
Image string `json:"image"`
|
||||
|
||||
// Тип файла улики: image | pdf | audio.
|
||||
FileType string `json:"file_type,omitempty"`
|
||||
}
|
||||
|
||||
// Дверь - действие или диалог
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user