Skip to content

Commit

Permalink
fix: #1409 (#1410)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruibaby authored Jun 29, 2021
1 parent 4aec84f commit 2420a44
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.util.HtmlUtils;
import run.halo.app.cache.lock.CacheLock;
import run.halo.app.cache.lock.CacheParam;
import run.halo.app.exception.NotFoundException;
import run.halo.app.model.dto.BaseCommentDTO;
import run.halo.app.model.dto.post.BasePostSimpleDTO;
Expand Down Expand Up @@ -214,7 +215,7 @@ public BaseCommentDTO comment(@RequestBody PostCommentParam postCommentParam) {
@PostMapping("{postId:\\d+}/likes")
@ApiOperation("Likes a post")
@CacheLock(autoDelete = false, traceRequest = true)
public void like(@PathVariable("postId") Integer postId) {
public void like(@PathVariable("postId") @CacheParam Integer postId) {
postService.increaseLike(postId);
}
}

0 comments on commit 2420a44

Please sign in to comment.