Class StudentsController
java.lang.Object
edu.ucsb.cs156.organic.controllers.ApiController
edu.ucsb.cs156.organic.controllers.StudentsController
@RequestMapping("/api/students")
@RestController
public class StudentsController
extends ApiController
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Methods inherited from class edu.ucsb.cs156.organic.controllers.ApiController
genericMessage, getCurrentUser, getMapper, handleAccessDeniedException, handleGenericException, handleIllegalArgumentException, mapperThatIgnoresMockitoMocks
-
Constructor Details
-
StudentsController
public StudentsController()
-
-
Method Details
-
getStaff
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/all") public Iterable<Student> getStaff(@RequestParam Long courseId) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
getStaff
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping(value="/upload/egrades", consumes="multipart/form-data") public Map<String,String> getStaff(@RequestParam Long courseId, @RequestParam("file") org.springframework.web.multipart.MultipartFile file) throws com.fasterxml.jackson.core.JsonProcessingException, IOException, com.opencsv.exceptions.CsvException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
IOException
com.opencsv.exceptions.CsvException
-
fromEgradesCSVRow
-
upsertStudent
-