generated from VLADIMIR/template
add AnswerService
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
||||
"evening_detective_server/internal/repos/team_answers_repo"
|
||||
"evening_detective_server/internal/repos/teams_repo"
|
||||
"evening_detective_server/internal/repos/users_repo"
|
||||
"evening_detective_server/internal/services/answer_service"
|
||||
"evening_detective_server/internal/services/file_service"
|
||||
"evening_detective_server/internal/services/game_service"
|
||||
"evening_detective_server/internal/services/mcp_service"
|
||||
@@ -143,10 +144,11 @@ func main() {
|
||||
storyteller,
|
||||
actionsRepo,
|
||||
applicationsRepo,
|
||||
answersRepo,
|
||||
cleaner,
|
||||
)
|
||||
|
||||
answerService := answer_service.NewAnswerService(gameRepo, teamRepo, scenarioService, answersRepo, actionsRepo)
|
||||
|
||||
teamService := team_service.NewTeamService(gameRepo, teamRepo, passwordGenerator, team_qr_pdf.NewGenerator(), os.Getenv("APP_BASE_URL"))
|
||||
|
||||
participationService := participation_service.NewParticipationService(teamRepo, os.Getenv("APP_BASE_URL"))
|
||||
@@ -199,6 +201,7 @@ func main() {
|
||||
fileService,
|
||||
scenarioService,
|
||||
gameService,
|
||||
answerService,
|
||||
teamService,
|
||||
participationService,
|
||||
screenRepo,
|
||||
@@ -306,7 +309,7 @@ func main() {
|
||||
// REST /api/teams/{id}/story). Путь /api/mcp длиннее /api/, поэтому
|
||||
// http.ServeMux отдаёт MCP-запросы этому хендлеру, а не gateway.
|
||||
mcpHTTP := server.NewStreamableHTTPServer(
|
||||
mcp_service.NewMCPService(gameService).Server(),
|
||||
mcp_service.NewMCPService(gameService, answerService).Server(),
|
||||
server.WithDisableLocalhostProtection(true),
|
||||
)
|
||||
mainMux.Handle("/api/mcp", mcpHTTP)
|
||||
|
||||
Reference in New Issue
Block a user