@RequestMapping(value = "/game/requests/response/", method = RequestMethod.POST)
    public String checkResponseRequestPage(IdForm idForm, ModelMap model){
        if (!idForm.getId().equals("")) {
            int id = Integer.parseInt(idForm.getId());
            String state = idForm.getState();
            try {
                if (!getRequests().isIdIncludeList(id)) {
                    throw new Exception();
                }
                Request request = requestService.getRequestById(id);
                if (state.equals("agree")) {
                    Field field1 = new Field("", "", false);
                    Field field2 = new Field("", "", false);
                    fieldService.addField(field1);
                    fieldService.addField(field2);

                    Game game = new Game(request.getFirstLogin(), request.getSecondLogin(),
                            false,"", field1.getId(), field2.getId());
                    gameService.addGame(game);
                    requestService.updateRequest(id, 1, game.getId());
                }
                if (state.equals("refuse")) {
                    requestService.updateRequest(id, -1, -1);
                }
                return "gamePages/successfulResponse";
            } catch (Exception e) {
            }
        }
        model.put("Error", "Wrong id");
        idForm.setId("");
        return "gamePages/responseRequest";
    }