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) allReportsByGameId(Long gameId) deleteReport(Long reportId) findByReportId(Long reportId) org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getLinesCSV(Long reportId) purgeOlderReports(Long reportId) Methods inherited from class ApiController
genericMessage, getCurrentUser, handleBadRequest, handleForbidden, handleGenericException
-
Constructor Details
-
ReportsController
public ReportsController()
-
-
Method Details
-
allReports
-
findByReportId
-
allReportsByGameId
-
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
-
deleteReport
-
purgeOlderReports
-