Class StudentController
java.lang.Object
edu.ucsb.cs156.happiercows.controllers.ApiController
edu.ucsb.cs156.happiercows.controllers.StudentController
@RequestMapping("/api/students")
@RestController
public class StudentController
extends ApiController
-
Constructor Summary
-
Method Summary
Methods inherited from class edu.ucsb.cs156.happiercows.controllers.ApiController
genericMessage, getCurrentUser, handleBadRequest, handleGenericException
-
Constructor Details
-
StudentController
public StudentController()
-
-
Method Details
-
getById
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("") public Student getById(@RequestParam Long id) throws EntityNotFoundException - Throws:
EntityNotFoundException
-
getByCourseId
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/course") public Iterable<Student> getByCourseId(@RequestParam Long courseId) throws EntityNotFoundException - Throws:
EntityNotFoundException
-
deleteArticle
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @DeleteMapping("") public Object deleteArticle(@RequestParam Long id) throws EntityNotFoundException - Throws:
EntityNotFoundException
-
postStudent
-