mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-22 22:21:09 +08:00
Add endpoint to list reaction types
This commit is contained in:
@@ -15,6 +15,14 @@ import org.springframework.web.bind.annotation.*;
|
||||
public class ReactionController {
|
||||
private final ReactionService reactionService;
|
||||
|
||||
/**
|
||||
* Get all available reaction types.
|
||||
*/
|
||||
@GetMapping("/reaction-types")
|
||||
public ReactionType[] listReactionTypes() {
|
||||
return ReactionType.values();
|
||||
}
|
||||
|
||||
@PostMapping("/posts/{postId}/reactions")
|
||||
public ResponseEntity<ReactionDto> reactToPost(@PathVariable Long postId,
|
||||
@RequestBody ReactionRequest req,
|
||||
|
||||
Reference in New Issue
Block a user