Class CourseController
java.lang.Object
edu.ucsb.cs156.happiercows.controllers.ApiController
edu.ucsb.cs156.happiercows.controllers.CourseController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method returns a list of all courses.deleteCourse(Long id) The schools offered in the Course create/edit dropdown.getCourseById(Long id) postCourse(CourseDTO courseDTO) updateCourse(Long id, CourseDTO courseDTO) Methods inherited from class ApiController
genericMessage, getCurrentUser, handleBadRequest, handleForbidden, handleGenericException
-
Constructor Details
-
CourseController
public CourseController()
-
-
Method Details
-
allOrganisations
-
getActiveSchools
@PreAuthorize("hasRole('ROLE_USER')") @GetMapping("/schools") public List<School> getActiveSchools()The schools offered in the Course create/edit dropdown. Only "active" schools are returned; seeSchoolfor schools kept in the codebase as examples but not yet offered to users.- Returns:
- the list of active schools
-
getCourseById
-
postCourse
-
updateCourse
-
deleteCourse
-