Class ChatMessageController

java.lang.Object
edu.ucsb.cs156.gauchoride.controllers.ApiController
edu.ucsb.cs156.gauchoride.controllers.ChatMessageController

@RequestMapping("/api/chat") @RestController public class ChatMessageController extends ApiController
  • Constructor Details

    • ChatMessageController

      public ChatMessageController()
  • Method Details

    • postMessage

      @PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_DRIVER\')") @PostMapping("/post") public ChatMessage postMessage(@RequestParam String content)
    • allMessagesNewWay

      @PreAuthorize("hasRole(\'ROLE_ADMIN\') || hasRole(\'ROLE_DRIVER\')") @GetMapping("/get") public org.springframework.data.domain.Page<ChatMessageWithUserInfo> allMessagesNewWay(@RequestParam int page, @RequestParam int size)