Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
student-tournament-hub
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Schneider Stefan
student-tournament-hub
Commits
29cdd86c
Commit
29cdd86c
authored
1 year ago
by
mhaed
Browse files
Options
Downloads
Patches
Plain Diff
28.12.2023 - controller updated
#24
parent
e84e61f3
No related branches found
Branches containing commit
No related tags found
1 merge request
!7
Dev in Main Merge
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sth-backend/src/main/java/hdm/mi/sthbackend/controller/TournamentController.java
+10
-3
10 additions, 3 deletions
...va/hdm/mi/sthbackend/controller/TournamentController.java
with
10 additions
and
3 deletions
sth-backend/src/main/java/hdm/mi/sthbackend/controller/TournamentController.java
+
10
−
3
View file @
29cdd86c
package
hdm.mi.sthbackend.controller
;
import
hdm.mi.sthbackend.exeptions.MatchIdNotFoundException
;
import
hdm.mi.sthbackend.exeptions.PlayerIdNotFoundException
;
import
hdm.mi.sthbackend.exeptions.TeamIdNotFoundException
;
import
hdm.mi.sthbackend.exeptions.TournamentIdNotFoundException
;
...
...
@@ -43,7 +44,7 @@ public class TournamentController {
public
UUID
removeTeamFromTournament
(
@PathVariable
UUID
tournamentId
,
@PathVariable
UUID
teamId
)
throws
TournamentIdNotFoundException
,
TeamIdNotFoundException
{
return
service
.
removeTeamFromTournament
(
tournamentId
,
teamId
);
}
;
}
@PostMapping
(
"/{tournamentId}/teams/{teamId}/addPlayer"
)
public
Player
addPlayerToTeam
(
@PathVariable
UUID
tournamentId
,
...
...
@@ -55,8 +56,14 @@ public class TournamentController {
@DeleteMapping
(
"/{tournamentId}/teams/{teamId}/players/{playerId}"
)
public
Player
removePlayerFromTeam
(
@PathVariable
UUID
tournamentId
,
@PathVariable
UUID
teamId
,
@PathVariable
UUID
playerId
)
throws
PlayerIdNotFoundException
,
TournamentIdNotFoundException
{
return
service
.
removePlayerFromTeam
(
tournamentId
,
teamId
,
playerId
);
@PathVariable
UUID
playerId
)
throws
PlayerIdNotFoundException
,
TournamentIdNotFoundException
{
// muss hier die PlayerIdNotFoundException eingefügt werden,
return
service
.
removePlayerFromTeam
(
tournamentId
,
teamId
,
playerId
);
// wenn die nicht im TournamentService drin ist?
}
@PatchMapping
public
UUID
determineWinner
(
@PathVariable
UUID
tournamentId
,
@PathVariable
UUID
matchId
)
throws
TournamentIdNotFoundException
,
MatchIdNotFoundException
{
return
service
.
determineWinner
(
tournamentId
,
matchId
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment