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 Details

    • EndGameController

      @Autowired public EndGameController(EndGameService endGameService)
  • 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).