Class CommonStatsController

java.lang.Object
edu.ucsb.cs156.happiercows.controllers.CommonStatsController

@RequestMapping("/api/commonstats") @RestController public class CommonStatsController extends Object
  • Constructor Details

    • CommonStatsController

      public CommonStatsController()
  • Method Details

    • allCommonStats

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("") public Iterable<CommonStats> allCommonStats()
    • allCommonStatsForCommons

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/commons") public Iterable<CommonStats> allCommonStatsForCommons(@RequestParam Long commonsId)
    • getCSV

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/download") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getCSV(@RequestParam Long commonsId) throws IOException
      Throws:
      IOException
    • getAllCSV

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @GetMapping("/downloadAll") public org.springframework.http.ResponseEntity<org.springframework.core.io.Resource> getAllCSV() throws IOException
      Throws:
      IOException