src/main/java/ru/vivt/controller/TestController.java
//fixme: the user with the necessary skills will simply get all the answers
the user with the necessary skills will simply get all the answers
the user with the necessary skills will simply get all the answers
@GetMapping("/api/test")
    public JsonObject test(@RequestParam int id) {
        JsonObject jsonTest = new JsonObject();
        jsonTest.add("test", gson.toJsonTree(testDAO.getTestById(id)));
        jsonTest.add("question", gson.toJsonTree(questionDAO.getAllQuestionByIdTest(id)));
        return jsonTest;
    }
@ GetMapping ( "/api/test" ) public JsonObject test ( @ RequestParam int id ) { JsonObject jsonTest = new JsonObject ( ) ; jsonTest . add ( "test" , gson . toJsonTree ( testDAO . getTestById ( id ) ) ) ; jsonTest . add ( "question" , gson . toJsonTree ( questionDAO . getAllQuestionByIdTest ( id ) ) ) ; return jsonTest ; }
fixme: the user with the necessary skills will simply get all the answers
fixme : the user with the necessary skills will simply get all the answers