This commit is contained in:
2026-10-03 13:22:11 +07:00
parent 05090722a0
commit 2caa2c1a88
74 changed files with 44 additions and 676 deletions
@@ -9,11 +9,6 @@ import (
"evening_detective_server/internal/repos"
)
// newApplication — улика для сохранения команде (AddTeamAction): имена
// приходят из истории уже с доменным префиксом (mapStory), в БД хранятся
// относительные пути — префикс снимается идемпотентно; file_type
// деривируется при пустом значении. Name не меняется (очистка — в
// вызывающем коде, cleaner'ом).
func newApplication(app *storytelling.Application, domain string) *repos.Application {
image := strings.TrimPrefix(app.Image, domain)
fileType := app.FileType
@@ -12,8 +12,8 @@ func TestNewApplication(t *testing.T) {
cases := []struct {
name string
app *storytelling.Application
image string // ожидаемое хранимое имя (без домена)
ftype string // ожидаемый file_type
image string
ftype string
}{
{
name: "доменный префикс снимается, file_type сохраняется",
@@ -2,7 +2,6 @@ package gameplay_service
import "evening_detective_server/internal/modules/storytelling"
// filterTeamStory применяется только к истории команды, общей для сайта и MCP.
func filterTeamStory(story *storytelling.Story, format string) {
if format != "offline" {
return