Skip to content

Commit

Permalink
Committed the code review stuff
Browse files Browse the repository at this point in the history
Committed to resolve something out of the code review.
  • Loading branch information
infstar committed Aug 8, 2024
1 parent 4b89386 commit d91f295
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
security = {@SecurityRequirement(name = "OAUTH2", scopes = {"READ_GRAD_STUDENT_COURSE_DATA"})})
public class CourseController {

private static final String BEARER = "Bearer ";

CourseService courseService;

GradValidation validation;
Expand All @@ -45,7 +43,8 @@ public CourseController(@Qualifier("CourseServiceV2") CourseService courseServic
@PreAuthorize(PermissionsConstants.READ_GRAD_COURSE)
@Operation(summary = "Find a Course by Course ID",
description = "Get a Course by Course ID", tags = { "Courses" })
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK")})
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "NOT FOUND")})
public ResponseEntity<Course> getCourseDetails(@PathVariable String courseID) {
log.info("#getCourseDetails : courseID={}", courseID);
return response.GET(courseService.getCourseInfo(courseID));
Expand All @@ -55,7 +54,8 @@ public ResponseEntity<Course> getCourseDetails(@PathVariable String courseID) {
@PreAuthorize(PermissionsConstants.READ_GRAD_COURSE)
@Operation(summary = "Find a Course by Course Code and Course Level",
description = "Get a Course by Course Code and Course Level", tags = { "Courses" })
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK")})
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "NOT FOUND")})
public ResponseEntity<Course> getCourseDetails(@PathVariable String courseCode, @PathVariable String courseLevel) {
log.info("#getCourseDetails : courseCode={}, courseLevel={}", courseCode, courseLevel);
return response.GET(courseService.getCourseInfo(courseCode, courseLevel));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ public StudentCourseController(StudentCourseService studentCourseService, GradVa
@GetMapping(EducCourseApiConstants.GET_STUDENT_COURSES_BY_STUDENT_ID_MAPPING)
@PreAuthorize(PermissionsConstants.READ_GRAD_COURSE)
@Operation(summary = "Find All Student Courses by Student ID", description = "Get All Student Courses by Student ID", tags = {"Student Courses"})
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"), @ApiResponse(responseCode = "204", description = "NO CONTENT")})
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "204", description = "NO CONTENT"),
@ApiResponse(responseCode = "400", description = "BAD REQUEST"),
@ApiResponse(responseCode = "404", description = "NOT FOUND"),
@ApiResponse(responseCode = "422", description = "VALIDATION ERROR")})
public ResponseEntity<List<StudentCourse>> getStudentCoursesByStudentID(
@PathVariable UUID studentID, @RequestParam(value = "sortForUI", required = false, defaultValue = "false") boolean sortForUI) {
validation.requiredField(studentID, "Student ID");
Expand Down

0 comments on commit d91f295

Please sign in to comment.