aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/api
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-02 00:11:09 +0300
committerGravatar Vitaly Takmazov2018-03-02 00:11:09 +0300
commit29be476f86054134b7123bc545250a11e173489c (patch)
tree28e71bf0e5099c76017f8ae41af19a91c31e5322 /juick-server/src/main/java/com/juick/server/api
parent377100d02d686819ca1ad666eeab74728c6c5e1a (diff)
server: discussions in api
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/Messages.java6
1 files changed, 6 insertions, 0 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) {