add stat and fix get place

This commit is contained in:
2025-12-06 16:50:06 +07:00
parent dad8d1c3a2
commit 0fe8b77d12
13 changed files with 136 additions and 11 deletions
+7 -2
View File
@@ -87,8 +87,13 @@ func (s *StoryService) GetPlace(code string) *Place {
for _, place := range s.story.Places {
if clearCode(place.Code) == code {
re := regexp.MustCompile(`\(\[[a-zA-Zа-яА-Я\d-]+\]\)`)
place.Text = re.ReplaceAllString(place.Text, "")
return place
text := re.ReplaceAllString(place.Text, "")
return &Place{
Code: place.Code,
Name: place.Name,
Text: text,
Applications: place.Applications,
}
}
}
return &Place{