mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-06-04 12:56:06 +00:00
Add post and comment deletion
This commit is contained in:
@@ -48,6 +48,11 @@ public class PostController {
|
||||
return ResponseEntity.ok(toDto(post));
|
||||
}
|
||||
|
||||
@DeleteMapping("/{id}")
|
||||
public void deletePost(@PathVariable Long id, Authentication auth) {
|
||||
postService.deletePost(id, auth.getName());
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
public ResponseEntity<PostDto> getPost(@PathVariable Long id, Authentication auth) {
|
||||
String viewer = auth != null ? auth.getName() : null;
|
||||
|
||||
Reference in New Issue
Block a user