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