feat:更新朋友圈功能
This commit is contained in:
@@ -24,6 +24,13 @@ public class MomentController {
|
||||
return momentService.addMoment(momentDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "更新朋友圈")
|
||||
@PutMapping("/{id}")
|
||||
public Boolean updateMoment(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) @Validated MomentDto momentDto) {
|
||||
return momentService.updateMoment(id, momentDto);
|
||||
}
|
||||
|
||||
@Operation(summary = "查询朋友圈")
|
||||
@GetMapping("")
|
||||
public @JsonView(ReadView.class) List<MomentDto> queryMoment() {
|
||||
@@ -32,9 +39,9 @@ public class MomentController {
|
||||
|
||||
@Operation(summary = "新增评论")
|
||||
@PostMapping("/{id}/comment")
|
||||
public Boolean addMoment(@PathVariable("id") long id,
|
||||
@RequestBody @JsonView(WriteView.class) @Validated CommentDto commentDto) {
|
||||
return momentService.addComment(id, commentDto);
|
||||
public Boolean addComment(@PathVariable("id") long id,
|
||||
@RequestParam String content) {
|
||||
return momentService.addComment(id, content);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user