class UserController {

    @ApiOperation(value = "Change status of one of the goals for current user to DONE.")
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = HttpStatuses.OK),
            @ApiResponse(code = 400, message = HttpStatuses.BAD_REQUEST),
            @ApiResponse(code = 403, message = HttpStatuses.FORBIDDEN),
    })
    @PatchMapping("/{userId}/goals/{goalId}")
    public ResponseEntity<UserGoalResponseDto> updateUserGoalStatus(
            @ApiParam("Id of current user. Cannot be empty.")
            @PathVariable @CurrentUserId Long userId,
            @ApiParam("Id of the UserGoal that belongs to current user. Cannot be empty.")
            @PathVariable Long goalId,
            @ApiParam(value = "Code of the needed language.", defaultValue = AppConstant.DEFAULT_LANGUAGE_CODE)
            @RequestParam(required = false, defaultValue = AppConstant.DEFAULT_LANGUAGE_CODE) String language) {
        return ResponseEntity
                .status(HttpStatus.CREATED)
                .body(userService.updateUserGoalStatus(userId, goalId, language));
    }

}