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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<ChatMessageWithUserInfo>
allMessagesNewWay
(int page, int size) postMessage
(String content) Methods inherited from class edu.ucsb.cs156.gauchoride.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException
-
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)
-