generated from VLADIMIR/template
add
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"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/gameplay_service"
|
||||
"evening_detective_server/internal/services/participation_service"
|
||||
"evening_detective_server/internal/services/scenarios_service"
|
||||
"evening_detective_server/internal/services/team_service"
|
||||
@@ -26,6 +27,7 @@ type server struct {
|
||||
fileService *file_service.FileService
|
||||
scenarioService *scenarios_service.ScenarioService
|
||||
gameService *game_service.GameService
|
||||
gameplayService *gameplay_service.GameplayService
|
||||
answerService *answer_service.AnswerService
|
||||
teamService *team_service.TeamService
|
||||
participationService *participation_service.ParticipationService
|
||||
@@ -39,6 +41,7 @@ func NewServer(
|
||||
fileService *file_service.FileService,
|
||||
scenarioService *scenarios_service.ScenarioService,
|
||||
gameService *game_service.GameService,
|
||||
gameplayService *gameplay_service.GameplayService,
|
||||
answerService *answer_service.AnswerService,
|
||||
teamService *team_service.TeamService,
|
||||
participationService *participation_service.ParticipationService,
|
||||
@@ -51,6 +54,7 @@ func NewServer(
|
||||
fileService: fileService,
|
||||
scenarioService: scenarioService,
|
||||
gameService: gameService,
|
||||
gameplayService: gameplayService,
|
||||
answerService: answerService,
|
||||
teamService: teamService,
|
||||
participationService: participationService,
|
||||
|
||||
@@ -81,7 +81,7 @@ func (s *server) GiveTeamApplications(ctx context.Context, req *proto.GiveTeamAp
|
||||
return nil, status.Errorf(codes.PermissionDenied, "permission denied")
|
||||
}
|
||||
|
||||
err := s.gameService.GiveTeamApplications(
|
||||
err := s.gameplayService.GiveTeamApplications(
|
||||
ctx,
|
||||
int(req.Id),
|
||||
req.Name,
|
||||
@@ -96,7 +96,7 @@ func (s *server) GiveTeamApplications(ctx context.Context, req *proto.GiveTeamAp
|
||||
}
|
||||
|
||||
func (s *server) GetTeamStory(ctx context.Context, req *proto.GetTeamStoryReq) (*proto.GetTeamStoryRsp, error) {
|
||||
story, game, actions, err := s.gameService.GetTeamActions(
|
||||
story, game, actions, err := s.gameplayService.GetTeamActions(
|
||||
ctx,
|
||||
int(req.Id),
|
||||
req.Password,
|
||||
@@ -119,7 +119,7 @@ func (s *server) GetTeamStory(ctx context.Context, req *proto.GetTeamStoryReq) (
|
||||
}
|
||||
|
||||
func (s *server) AddTeamAction(ctx context.Context, req *proto.AddTeamActionReq) (*proto.AddTeamActionRsp, error) {
|
||||
err := s.gameService.AddTeamAction(
|
||||
err := s.gameplayService.AddTeamAction(
|
||||
ctx,
|
||||
int(req.Id),
|
||||
req.Password,
|
||||
@@ -141,7 +141,7 @@ func (s *server) DeleteLastTeamAction(ctx context.Context, req *proto.DeleteLast
|
||||
return nil, status.Errorf(codes.PermissionDenied, "permission denied")
|
||||
}
|
||||
|
||||
err := s.gameService.DeleteLastTeamAction(
|
||||
err := s.gameplayService.DeleteLastTeamAction(
|
||||
ctx,
|
||||
int(req.Id),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user