feat: add notification system

This commit is contained in:
Tim
2025-07-02 17:16:42 +08:00
parent 93b14f48e4
commit d6b33e65f4
11 changed files with 248 additions and 10 deletions

View File

@@ -31,6 +31,11 @@ public class AdminPostController {
return toDto(postService.approvePost(id));
}
@PostMapping("/{id}/reject")
public PostDto reject(@PathVariable Long id) {
return toDto(postService.rejectPost(id));
}
private PostDto toDto(Post post) {
PostDto dto = new PostDto();
dto.setId(post.getId());