fix codes

This commit is contained in:
2026-07-29 19:40:46 +07:00
parent a227b80896
commit 1291a71a1a
3 changed files with 1 additions and 7 deletions
Binary file not shown.
-1
View File
@@ -98,7 +98,6 @@ func main() {
os.Getenv("FILE_PREFIX_DOMAIN"), os.Getenv("FILE_PREFIX_DOMAIN"),
passwordGenerator, passwordGenerator,
storyteller, storyteller,
cleaner,
actionsRepo, actionsRepo,
applicationsRepo, applicationsRepo,
) )
+1 -6
View File
@@ -2,7 +2,6 @@ package game_service
import ( import (
"context" "context"
"evening_detective_server/internal/modules/cleaner"
"evening_detective_server/internal/modules/password_generator" "evening_detective_server/internal/modules/password_generator"
"evening_detective_server/internal/modules/storytelling" "evening_detective_server/internal/modules/storytelling"
"evening_detective_server/internal/repos/actions_repo" "evening_detective_server/internal/repos/actions_repo"
@@ -22,7 +21,6 @@ type GameService struct {
domain string domain string
passwordGenerator password_generator.IPasswordGenerator passwordGenerator password_generator.IPasswordGenerator
storyteller storytelling.IStory storyteller storytelling.IStory
cleaner cleaner.ICleaner
actionsRepo *actions_repo.ActionsRepo actionsRepo *actions_repo.ActionsRepo
applicationsRepo *applications_repo.ApplicationsRepo applicationsRepo *applications_repo.ApplicationsRepo
} }
@@ -35,7 +33,6 @@ func NewGameService(
domain string, domain string,
passwordGenerator password_generator.IPasswordGenerator, passwordGenerator password_generator.IPasswordGenerator,
storyteller storytelling.IStory, storyteller storytelling.IStory,
cleaner cleaner.ICleaner,
actionsRepo *actions_repo.ActionsRepo, actionsRepo *actions_repo.ActionsRepo,
applicationsRepo *applications_repo.ApplicationsRepo, applicationsRepo *applications_repo.ApplicationsRepo,
) *GameService { ) *GameService {
@@ -47,7 +44,6 @@ func NewGameService(
domain: domain, domain: domain,
passwordGenerator: passwordGenerator, passwordGenerator: passwordGenerator,
storyteller: storyteller, storyteller: storyteller,
cleaner: cleaner,
actionsRepo: actionsRepo, actionsRepo: actionsRepo,
applicationsRepo: applicationsRepo, applicationsRepo: applicationsRepo,
} }
@@ -208,8 +204,7 @@ func (s *GameService) AddTeamAction(ctx context.Context, teamId int, password st
return teams_repo.ErrTeamNotFound return teams_repo.ErrTeamNotFound
} }
code := s.cleaner.ClearCode(actionCode) _, err = s.actionsRepo.AddAction(ctx, teamId, actionCode)
_, err = s.actionsRepo.AddAction(ctx, teamId, code)
if err != nil { if err != nil {
return err return err
} }