generated from VLADIMIR/template
fix names
This commit is contained in:
@@ -43,8 +43,8 @@ func NewTeamService(
|
||||
|
||||
func (s *TeamService) AddTeam(
|
||||
ctx context.Context,
|
||||
creatorId int,
|
||||
gameId int,
|
||||
creatorID int,
|
||||
gameID int,
|
||||
name string,
|
||||
captainEmail string,
|
||||
) (*game_model.Team, error) {
|
||||
@@ -56,11 +56,11 @@ func (s *TeamService) AddTeam(
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
game, err := s.gamesRepo.GetGameByID(ctx, gameId)
|
||||
game, err := s.gamesRepo.GetGameByID(ctx, gameID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
id, err := s.teamsRepo.AddTeamWithParticipation(ctx, creatorId, gameId, name, password, captainEmail, !time.Now().Before(game.StartAt.Add(-24*time.Hour)))
|
||||
id, err := s.teamsRepo.AddTeamWithParticipation(ctx, creatorID, gameID, name, password, captainEmail, !time.Now().Before(game.StartAt.Add(-24*time.Hour)))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -70,12 +70,12 @@ func (s *TeamService) AddTeam(
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (s *TeamService) UpdateTeam(ctx context.Context, teamId int, name string) error {
|
||||
return s.teamsRepo.UpdateTeam(ctx, teamId, name)
|
||||
func (s *TeamService) UpdateTeam(ctx context.Context, teamID int, name string) error {
|
||||
return s.teamsRepo.UpdateTeam(ctx, teamID, name)
|
||||
}
|
||||
|
||||
func (s *TeamService) DeleteTeam(ctx context.Context, teamId int) error {
|
||||
return s.teamsRepo.DeleteTeam(ctx, teamId)
|
||||
func (s *TeamService) DeleteTeam(ctx context.Context, teamID int) error {
|
||||
return s.teamsRepo.DeleteTeam(ctx, teamID)
|
||||
}
|
||||
|
||||
func (s *TeamService) RegisterTeam(ctx context.Context, gameID int, deliveryID string, registration Registration) (int, error) {
|
||||
|
||||
Reference in New Issue
Block a user