diff options
author | 2018-09-06 13:58:40 +0300 | |
---|---|---|
committer | 2018-09-07 05:15:51 -0400 | |
commit | 670913698776e09b7ff44f44ccdcf56303d79be3 (patch) | |
tree | 96f932645ab0faf9de6861f89072d1eb4b2622a3 /juick-server/src/main/java/com/juick/server/api/Users.java | |
parent | 51489a954463567f8dd50854826c03ce51c45cb3 (diff) |
merge legacy www
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api/Users.java')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/Users.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Users.java b/juick-server/src/main/java/com/juick/server/api/Users.java index 237b7ed6..7f29a327 100644 --- a/juick-server/src/main/java/com/juick/server/api/Users.java +++ b/juick-server/src/main/java/com/juick/server/api/Users.java @@ -52,12 +52,12 @@ public class Users { private EmailService emailService; @ApiOperation(value = "This returns user token", notes = "Pass login and password using HTTP Basic") - @RequestMapping(value = "/auth", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping(value = "/api/auth", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public String getAuthToken() { return userService.getHashByUID(UserUtils.getCurrentUser().getUid()); } - @RequestMapping(value = "/users", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping(value = "/api/users", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public List<User> doGetUsers( @RequestParam(value = "uname", required = false) List<String> unames) { List<com.juick.User> users = new ArrayList<>(); @@ -78,7 +78,7 @@ public class Users { throw new HttpNotFoundException(); } - @GetMapping("/me") + @GetMapping("/api/me") public SecureUser getMe() { User visitor = UserUtils.getCurrentUser(); SecureUser me = new SecureUser(); @@ -93,7 +93,7 @@ public class Users { return me; } - @RequestMapping(value = "/users/read", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping(value = "/api/users/read", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public List<User> doGetUserRead( @RequestParam String uname) { User visitor = UserUtils.getCurrentUser(); @@ -118,7 +118,7 @@ public class Users { throw new HttpNotFoundException(); } - @RequestMapping(value = "/users/readers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping(value = "/api/users/readers", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public List<User> doGetUserReaders( @RequestParam String uname) { User visitor = UserUtils.getCurrentUser(); @@ -144,7 +144,7 @@ public class Users { } @ApiOperation(value = "This returns detailed user info") - @GetMapping("/info/{uname}") + @GetMapping("/api/info/{uname}") public UserInfo getUserInfo(@PathVariable String uname) { User user = userService.getUserByName(uname); if (!user.isBanned()) { |