Class HelpController

java.lang.Object
edu.ucsb.cs156.example.controllers.ApiController
edu.ucsb.cs156.example.controllers.HelpController

@RequestMapping("/api/help") @RestController public class HelpController extends ApiController
  • Constructor Details

    • HelpController

      public HelpController()
  • Method Details

    • allHelp

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("/all") public Iterable<Help> allHelp()
    • postHelp

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/post") public Help postHelp(@RequestParam String requesterEmail, @RequestParam String teamId, @RequestParam String tableOrBreakoutRoom, @RequestParam("requestTime") @DateTimeFormat(iso=DATE_TIME) LocalDateTime requestTime, @RequestParam String explanation, @RequestParam boolean solved) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • getById

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("") public Help getById(@RequestParam Long id)
    • deleteHelp

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @DeleteMapping("") public Object deleteHelp(@RequestParam Long id)
    • updateHelp

      @PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PutMapping("") public Help updateHelp(@RequestParam Long id, @RequestBody @Valid @Valid Help incoming)