Class CoursesController
java.lang.Object
edu.ucsb.cs156.happiercows.controllers.ApiController
edu.ucsb.cs156.happiercows.controllers.CoursesController
@RequestMapping("/api/courses")
@RestController
public class CoursesController
extends ApiController
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionpostCourses(String name, String school, String term, LocalDateTime startDate, LocalDateTime endDate) updateCourses(Long id, @Valid Courses incoming) Methods inherited from class edu.ucsb.cs156.happiercows.controllers.ApiController
genericMessage, getCurrentUser, handleBadRequest, handleGenericException 
- 
Constructor Details
- 
CoursesController
public CoursesController() 
 - 
 - 
Method Details
- 
allCourses
 - 
postCourses
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/post") public Courses postCourses(@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) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
 com.fasterxml.jackson.core.JsonProcessingException
 - 
updateCourses
 
 -