Class PSCourseController
java.lang.Object
edu.ucsb.cs156.courses.controllers.ApiController
edu.ucsb.cs156.courses.controllers.PSCourseController
@RequestMapping("/api/courses")
@RestController
public class PSCourseController
extends ApiController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallCoursesForPsId
(Long psId) deleteCourses
(Long id) getCourseById
(Long id) postCourses
(String enrollCd, Long psId) putCourseById_admin
(Long id, @Valid PSCourse incomingCourses) putCoursesById
(Long id, @Valid PSCourse incomingCourses) thisUsersCoursesForPsId
(Long psId) Methods inherited from class edu.ucsb.cs156.courses.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException, handleIllegalArgumentException
-
Constructor Details
-
PSCourseController
public PSCourseController()
-
-
Method Details
-
allUsersCourses
-
thisUsersCourses
-
allCoursesForPsId
-
thisUsersCoursesForPsId
-
getCourseById_admin
-
getCourseById
-
postCourses
@PreAuthorize("hasRole(\'ROLE_USER\')") @PostMapping("/post") public ArrayList<PSCourse> postCourses(@RequestParam String enrollCd, @RequestParam Long psId) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
deleteCourses_Admin
-
deleteCourses
@PreAuthorize("hasRole(\'ROLE_USER\')") @DeleteMapping("/user") public Object deleteCourses(@RequestParam Long id) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
putCourseById_admin
-
putCoursesById
-