generated from VLADIMIR/template
update
This commit is contained in:
@@ -106,6 +106,10 @@ func TestParticipationPostgres(t *testing.T) {
|
||||
state(3, "pending")
|
||||
state(4, "confirmed")
|
||||
state(5, "pending")
|
||||
if err := repo.ConfirmParticipationByFirstAction(ctx, 5); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
state(5, "confirmed")
|
||||
// Independent workers must claim each due team just once.
|
||||
var wg sync.WaitGroup
|
||||
ids := make(chan int, 8)
|
||||
|
||||
@@ -299,6 +299,11 @@ func (s *GameService) AddTeamAction(ctx context.Context, teamId int, password st
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if team.ParticipationStatus == "pending" {
|
||||
if err := s.teamsRepo.ConfirmParticipationByFirstAction(ctx, teamId); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
game, err := s.gamesRepo.GetGameByID(ctx, team.GameId)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user