diff options
Diffstat (limited to 'juick-server')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/Messages.java | 6 | ||||
-rw-r--r-- | juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java | 2 |
2 files changed, 6 insertions, 2 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 21156d79..87229131 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 @@ -17,6 +17,7 @@ package com.juick.server.api; +import com.juick.Message; import com.juick.Status; import com.juick.Tag; import com.juick.User; @@ -143,6 +144,11 @@ public class Messages { : null; return ResponseEntity.ok(messagesService.getNotifications(visitor, beforeTime)); } + @GetMapping("/messages/discussions") + public List<Message> getDiscussions( + @RequestParam(required = false, defaultValue = "0") Long to) { + return messagesService.getMessages(messagesService.getDiscussions(UserUtils.getCurrentUser().getUid(), to)); + } @RequestMapping("/thread") public ResponseEntity<List<com.juick.Message>> getThread( @RequestParam(defaultValue = "0") int mid) { diff --git a/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java b/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java index f074f9c7..a065f79e 100644 --- a/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java +++ b/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java @@ -24,8 +24,6 @@ import com.juick.service.security.deprecated.RequestParamHashRememberMeServices; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Import; -import org.springframework.context.annotation.PropertySource; import org.springframework.http.HttpMethod; import org.springframework.security.authentication.dao.DaoAuthenticationProvider; import org.springframework.security.config.annotation.web.builders.HttpSecurity; |