ProblemController

@Validated
@RestController
@RequestMapping(value = ["/api/v1/problems"], produces = ["application/json"])
class ProblemController(browseProblemsUseCase: BrowseProblemsUseCase, readProblemUseCase: ReadProblemUseCase, checkProblemUseCase: CheckProblemUseCase, browseUndoneProblemsUseCase: BrowseUndoneProblemsUseCase)

Constructors

Link copied to clipboard
constructor(browseProblemsUseCase: BrowseProblemsUseCase, readProblemUseCase: ReadProblemUseCase, checkProblemUseCase: CheckProblemUseCase, browseUndoneProblemsUseCase: BrowseUndoneProblemsUseCase)

Functions

Link copied to clipboard
@GetMapping
fun browseProblems(@RequestParam(value = "articleId", required = false) articleId: Long?): ApiResponse<ApiResponse.SuccessBody<BrowseProblemsResponse>>
Link copied to clipboard
@GetMapping(value = ["/unsubmitted"])
fun browseUndoneProblems(userArgumentDetails: UserArgumentDetails): ApiResponse<ApiResponse.SuccessBody<BrowseProblemsResponse>>
Link copied to clipboard
@PostMapping(value = ["/{problemId}"])
fun checkProblem(userArgumentDetails: UserArgumentDetails, @PathVariable(value = "problemId") @Min(value = 1, message = "{min.id}") problemId: Long, @Valid @RequestBody body: CheckProblemRequest): ApiResponse<ApiResponse.SuccessBody<CheckProblemResponse>>
Link copied to clipboard
@GetMapping(value = ["/{problemId}"])
fun readProblem(@PathVariable(value = "problemId") @Min(value = 1, message = "{min.id}") problemId: Long): ApiResponse<ApiResponse.SuccessBody<ReadProblemResponse>>