Class CourseController
java.lang.Object
edu.ucsb.cs156.happiercows.controllers.ApiController
edu.ucsb.cs156.happiercows.controllers.CourseController
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeleteCourse
(Long id) postCourse
(String name, String school, String term, LocalDateTime startDate, LocalDateTime endDate) Methods inherited from class edu.ucsb.cs156.happiercows.controllers.ApiController
genericMessage, getCurrentUser, handleBadRequest, handleGenericException
-
Constructor Details
-
CourseController
public CourseController()
-
-
Method Details
-
allCourses
-
postCourse
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/post") public Course postCourse(@RequestParam String name, @RequestParam String school, @RequestParam String term, @RequestParam("startDate") @DateTimeFormat(iso=DATE_TIME) LocalDateTime startDate, @RequestParam("endDate") @DateTimeFormat(iso=DATE_TIME) LocalDateTime endDate) -
deleteCourse
-