diff options
Diffstat (limited to 'src/main/java/com/juick/server/api')
-rw-r--r-- | src/main/java/com/juick/server/api/Messages.java | 2 | ||||
-rw-r--r-- | src/main/java/com/juick/server/api/Notifications.java | 12 | ||||
-rw-r--r-- | src/main/java/com/juick/server/api/PM.java | 6 | ||||
-rw-r--r-- | src/main/java/com/juick/server/api/Post.java | 4 | ||||
-rw-r--r-- | src/main/java/com/juick/server/api/Tags.java | 2 | ||||
-rw-r--r-- | src/main/java/com/juick/server/api/Users.java | 8 | ||||
-rw-r--r-- | src/main/java/com/juick/server/api/activity/Profile.java | 2 |
7 files changed, 18 insertions, 18 deletions
diff --git a/src/main/java/com/juick/server/api/Messages.java b/src/main/java/com/juick/server/api/Messages.java index f7b8c156..1c9e37ad 100644 --- a/src/main/java/com/juick/server/api/Messages.java +++ b/src/main/java/com/juick/server/api/Messages.java @@ -49,7 +49,7 @@ import java.util.stream.Collectors; * @author ugnich */ @RestController -@RequestMapping(produces = MediaType.APPLICATION_JSON_VALUE) +@RequestMapping(produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public class Messages { private static final ResponseEntity<List<com.juick.Message>> NOT_FOUND = ResponseEntity diff --git a/src/main/java/com/juick/server/api/Notifications.java b/src/main/java/com/juick/server/api/Notifications.java index 72988298..f2c2d712 100644 --- a/src/main/java/com/juick/server/api/Notifications.java +++ b/src/main/java/com/juick/server/api/Notifications.java @@ -84,7 +84,7 @@ public class Notifications { } @ApiIgnore - @RequestMapping(value = "/api/notifications", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/notifications", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public ResponseEntity<List<User>> doGet( @Visitor User visitor, @RequestParam(required = false, defaultValue = "0") int uid, @@ -119,7 +119,7 @@ public class Notifications { } @ApiIgnore - @RequestMapping(value = "/api/notifications", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/notifications", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public ResponseEntity<Status> doDelete( @Visitor User visitor, @RequestBody List<ExternalToken> list) { @@ -145,7 +145,7 @@ public class Notifications { return ResponseEntity.ok(Status.OK); } @ApiIgnore - @RequestMapping(value = "/api/notifications/delete", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/notifications/delete", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public ResponseEntity<Status> doDeleteTokens( @Visitor User visitor, @RequestBody List<ExternalToken> list) { @@ -172,7 +172,7 @@ public class Notifications { } @ApiIgnore - @RequestMapping(value = "/api/notifications", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/notifications", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public Status doPut( @Visitor User visitor, @RequestBody List<ExternalToken> list) throws IOException { @@ -195,7 +195,7 @@ public class Notifications { } @Deprecated - @RequestMapping(value = "/api/android/register", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/android/register", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public Status doAndroidRegister( @Visitor User visitor, @RequestParam(name = "regid") String regId) { @@ -204,7 +204,7 @@ public class Notifications { } @Deprecated - @RequestMapping(value = "/api/winphone/register", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/winphone/register", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public Status doWinphoneRegister( @Visitor User visitor, @RequestParam(name = "url") String regId) { diff --git a/src/main/java/com/juick/server/api/PM.java b/src/main/java/com/juick/server/api/PM.java index 6e6cdcac..4a408dce 100644 --- a/src/main/java/com/juick/server/api/PM.java +++ b/src/main/java/com/juick/server/api/PM.java @@ -55,7 +55,7 @@ public class PM { @Inject private WebApp webApp; - @RequestMapping(value = "/api/pm", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/pm", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public List<com.juick.Message> doGetPM( @Visitor User visitor, @RequestParam(required = false) String uname) { @@ -73,7 +73,7 @@ public class PM { return msgs; } - @RequestMapping(value = "/api/pm", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/pm", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public com.juick.Message doPostPM( @Visitor User visitor, @RequestParam String uname, @@ -105,7 +105,7 @@ public class PM { } throw new HttpBadRequestException(); } - @RequestMapping(value = "/api/groups_pms", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/groups_pms", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public PrivateChats doGetGroupsPMs( @Visitor User visitor, @RequestParam(defaultValue = "5") int cnt) { diff --git a/src/main/java/com/juick/server/api/Post.java b/src/main/java/com/juick/server/api/Post.java index 59bd05a7..10e19faf 100644 --- a/src/main/java/com/juick/server/api/Post.java +++ b/src/main/java/com/juick/server/api/Post.java @@ -67,7 +67,7 @@ public class Post { @Inject CommandsManager commandsManager; - @RequestMapping(value = "/api/post", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/post", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseStatus(value = HttpStatus.OK) public CommandResult doPostMessage( @Visitor User visitor, @@ -99,7 +99,7 @@ public class Post { return commandsManager.processCommand(visitor, body, attachmentFName); } - @RequestMapping(value = "/api/comment", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/comment", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public CommandResult doPostComment( @Visitor User visitor, @RequestParam(defaultValue = "0") int mid, diff --git a/src/main/java/com/juick/server/api/Tags.java b/src/main/java/com/juick/server/api/Tags.java index 2862d883..35f2bc66 100644 --- a/src/main/java/com/juick/server/api/Tags.java +++ b/src/main/java/com/juick/server/api/Tags.java @@ -38,7 +38,7 @@ public class Tags { @Inject private TagService tagService; - @RequestMapping(value = "/api/tags", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/tags", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public List<TagStats> tags( @Visitor User visitor, @RequestParam(required = false, defaultValue = "0") int user_id diff --git a/src/main/java/com/juick/server/api/Users.java b/src/main/java/com/juick/server/api/Users.java index 6d7c7a45..74a720d4 100644 --- a/src/main/java/com/juick/server/api/Users.java +++ b/src/main/java/com/juick/server/api/Users.java @@ -81,12 +81,12 @@ public class Users { @Inject private EmailManager emailManager; - @RequestMapping(value = "/api/auth", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/auth", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public String getAuthToken(@Visitor User visitor) { return userService.getHashByUID(visitor.getUid()); } - @RequestMapping(value = "/api/users", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/users", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public List<User> doGetUsers( @Visitor User visitor, @RequestParam(value = "uname", required = false) List<String> unames) { @@ -190,7 +190,7 @@ public class Users { } } - @RequestMapping(value = "/api/users/read", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/users/read", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public List<User> doGetUserRead( @Visitor User visitor, @RequestParam String uname) { @@ -214,7 +214,7 @@ public class Users { throw new HttpNotFoundException(); } - @RequestMapping(value = "/api/users/readers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @RequestMapping(value = "/api/users/readers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public List<User> doGetUserReaders( @Visitor User visitor, @RequestParam String uname) { diff --git a/src/main/java/com/juick/server/api/activity/Profile.java b/src/main/java/com/juick/server/api/activity/Profile.java index 88c76a93..77945d6b 100644 --- a/src/main/java/com/juick/server/api/activity/Profile.java +++ b/src/main/java/com/juick/server/api/activity/Profile.java @@ -388,7 +388,7 @@ public class Profile { } return new ResponseEntity<>(CommandResult.fromString("Can not authenticate"), HttpStatus.UNAUTHORIZED); } - @PostMapping(value = "/u/", produces = MediaType.APPLICATION_JSON_VALUE) + @PostMapping(value = "/u/", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public User fetchUser(@RequestParam URI uri) { return activityPubManager.personToUser(uri); } |