feat:新增点赞接口
This commit is contained in:
@@ -49,5 +49,17 @@ public class MomentController {
|
||||
@RequestParam String content) {
|
||||
return momentService.addComment(id, content);
|
||||
}
|
||||
|
||||
@Operation(summary = "增加点赞")
|
||||
@PostMapping("/{id}/like")
|
||||
public Boolean addLike(@PathVariable("id") long id) {
|
||||
return momentService.addLike(id);
|
||||
}
|
||||
|
||||
@Operation(summary = "取消点赞")
|
||||
@DeleteMapping("/{id}/like")
|
||||
public Boolean deleteLike(@PathVariable("id") long id) {
|
||||
return momentService.deleteLike(id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user