Class EndGameController
java.lang.Object
com.chess.backend.restController.controller.EndGameController
@RestController
@CrossOrigin
@RequestMapping("/endGame")
public class EndGameController
extends Object
This class handles the API-call to end a game.
- Author:
- Hannes Stuetzer
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EndGameController
-
-
Method Details
-
endGame
@PostMapping public org.springframework.http.ResponseEntity<Boolean> endGame(@RequestParam("gameID") int gameID) Method that is called on a post request.- Parameters:
gameID
- the ID of the game that should be ended.- Returns:
- true if the ending of the game was successful and false if it was not successful (a reasons for example could be a wrong game ID).
-