diff options
Diffstat (limited to 'juick-api/src/main')
-rw-r--r-- | juick-api/src/main/java/com/juick/server/api/Post.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-api/src/main/java/com/juick/server/api/Post.java b/juick-api/src/main/java/com/juick/server/api/Post.java index d007b9af..afe9d2d5 100644 --- a/juick-api/src/main/java/com/juick/server/api/Post.java +++ b/juick-api/src/main/java/com/juick/server/api/Post.java @@ -157,7 +157,7 @@ public class Post { @ResponseStatus(value = HttpStatus.OK) public Status doPostRecomm(@RequestParam Integer mid) throws Exception { com.juick.User visitor = UserUtils.getCurrentUser(); - if (visitor.getUid() == 0) { + if (visitor.isAnonymous()) { throw new HttpForbiddenException(); } com.juick.Message msg = messagesService.getMessage(mid); @@ -185,7 +185,7 @@ public class Post { logger.info("got reaction with type: {}", reactionId); com.juick.User visitor = UserUtils.getCurrentUser(); - if (visitor.getUid() == 0) { + if (visitor.isAnonymous()) { throw new HttpForbiddenException(); } com.juick.Message msg = messagesService.getMessage(mid); |