Reopen group
This commit is contained in:
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@@ -37,7 +37,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Push the Docker Image to DockerHUb') {
|
stage('Push the Docker Image to DockerHub') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
withCredentials([string(credentialsId: 'c7783e4f-2f79-482f-885f-dfb39f8c02d3', variable: 'docker_hub')]) {
|
withCredentials([string(credentialsId: 'c7783e4f-2f79-482f-885f-dfb39f8c02d3', variable: 'docker_hub')]) {
|
||||||
|
|||||||
@@ -141,6 +141,13 @@ public class TournamentController {
|
|||||||
return ResponseEntity.ok(tournamentMapper.toDto(tournamentPlayService.finishGroup(tournament, groupId)));
|
return ResponseEntity.ok(tournamentMapper.toDto(tournamentPlayService.finishGroup(tournament, groupId)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/tournaments/{tournamentId}/groups/{groupId}/reopen")
|
||||||
|
public ResponseEntity<TournamentDto> reopenGroup(@PathVariable Long tournamentId, @PathVariable Long groupId) {
|
||||||
|
var tournament = tournamentService.findTournamentById(tournamentId);
|
||||||
|
|
||||||
|
return ResponseEntity.ok(tournamentMapper.toDto(tournamentPlayService.reopenGroup(tournament, groupId)));
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/tournaments/{tournamentId}/groups/{groupId}/new")
|
@PostMapping("/tournaments/{tournamentId}/groups/{groupId}/new")
|
||||||
public ResponseEntity<TournamentDto> newRound(@PathVariable Long tournamentId, @PathVariable Long groupId) {
|
public ResponseEntity<TournamentDto> newRound(@PathVariable Long tournamentId, @PathVariable Long groupId) {
|
||||||
var tournament = tournamentService.findTournamentById(tournamentId);
|
var tournament = tournamentService.findTournamentById(tournamentId);
|
||||||
|
|||||||
@@ -47,6 +47,12 @@ public class TournamentPlayService {
|
|||||||
return tournament;
|
return tournament;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Tournament reopenGroup(Tournament tournament, Long groupId) {
|
||||||
|
getGroup(tournament, groupId).setStatus(Status.IN_PROGRESS);
|
||||||
|
tournamentRepository.save(tournament);
|
||||||
|
return tournament;
|
||||||
|
}
|
||||||
|
|
||||||
public Tournament newRound(Tournament tournament, Long groupId) {
|
public Tournament newRound(Tournament tournament, Long groupId) {
|
||||||
var group = getGroup(tournament, groupId);
|
var group = getGroup(tournament, groupId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user