diff options
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api/Messages.java')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/Messages.java | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Messages.java b/juick-server/src/main/java/com/juick/server/api/Messages.java index c6600e2b..7eb86284 100644 --- a/juick-server/src/main/java/com/juick/server/api/Messages.java +++ b/juick-server/src/main/java/com/juick/server/api/Messages.java @@ -18,11 +18,9 @@ package com.juick.server.api; import com.juick.Message; -import com.juick.Status; import com.juick.Tag; import com.juick.User; import com.juick.server.util.HttpBadRequestException; -import com.juick.server.util.HttpForbiddenException; import com.juick.server.util.UserUtils; import com.juick.service.MessagesService; import com.juick.service.TagService; @@ -33,7 +31,6 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; -import springfox.documentation.annotations.ApiIgnore; import javax.inject.Inject; import java.io.IOException; @@ -167,20 +164,4 @@ public class Messages { } throw new HttpBadRequestException(); } - @ApiIgnore - @RequestMapping("/messages/set_privacy") - @ResponseBody - public ResponseEntity<Status> doSetPrivacy( - @RequestParam(defaultValue = "0") int mid) { - User visitor = UserUtils.getCurrentUser(); - int vuid = visitor.getUid(); - if (vuid == 0) { - throw new HttpForbiddenException(); - } - com.juick.User user = messagesService.getMessageAuthor(mid); - if (user != null && user.getUid() == vuid && messagesService.setMessagePrivacy(mid)) { - return ResponseEntity.ok(Status.OK); - } - throw new HttpForbiddenException(); - } } |