Class ReportsController
java.lang.Object
edu.ucsb.cs156.happiercows.controllers.ApiController
edu.ucsb.cs156.happiercows.controllers.ReportsController
@RequestMapping("/api/reports")
@RestController
public class ReportsController
extends ApiController
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionallLinesByReportId(Long reportId) allReportsByCommonsId(Long commonsId) findByReportId(Long reportId) org.springframework.http.ResponseEntity<org.springframework.core.io.Resource>getLinesCSV(Long reportId) Methods inherited from class edu.ucsb.cs156.happiercows.controllers.ApiController
genericMessage, getCurrentUser, handleBadRequest, handleGenericException 
- 
Constructor Details
- 
ReportsController
public ReportsController() 
 - 
 - 
Method Details
- 
allReports
 - 
findByReportId
 - 
allReportsByCommonsId
 - 
allLinesByReportId
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/lines") public Iterable<ReportLine> allLinesByReportId(@RequestParam Long reportId)  - 
getLinesCSV
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/download") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getLinesCSV(@RequestParam Long reportId) throws IOException - Throws:
 IOException
 
 -