diff options
author | Vitaly Takmazov | 2018-04-20 11:22:21 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-04-20 11:22:21 +0300 |
commit | db14962b7171eb0e713da54eecb032331d551d66 (patch) | |
tree | 85d24b6a9d6d57759a2bc944bdf439614c2b1662 /juick-server/src/main | |
parent | 842e903d5b987dd23e82a423bddae75acdea0c9c (diff) |
server: /reactions list
Diffstat (limited to 'juick-server/src/main')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/Post.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Post.java b/juick-server/src/main/java/com/juick/server/api/Post.java index 5a027ece..2e1ca6d7 100644 --- a/juick-server/src/main/java/com/juick/server/api/Post.java +++ b/juick-server/src/main/java/com/juick/server/api/Post.java @@ -17,6 +17,7 @@ package com.juick.server.api; +import com.juick.Reaction; import com.juick.Status; import com.juick.User; import com.juick.server.CommandsManager; @@ -52,9 +53,7 @@ import java.net.URI; import java.net.URL; import java.nio.charset.StandardCharsets; import java.nio.file.Paths; -import java.util.Properties; -import java.util.Scanner; -import java.util.UUID; +import java.util.*; /** * Created by vt on 24/11/2016. @@ -256,6 +255,12 @@ public class Post { return Status.getStatus(status.getText()); } + @GetMapping("/reactions") + @ResponseStatus(value = HttpStatus.OK) + public List<Reaction> reactionsList() { + return messagesService.listReactions(); + } + @PostMapping("/react") @ResponseStatus(value = HttpStatus.OK) public Status doPostReact(@RequestParam Integer mid,@RequestParam @NotNull int reactionId){ |