From 64bf33c905e069bd9171198998c82159b3b07904 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 10 Mar 2017 20:36:14 +0300 Subject: juick-api: rename before_mid variable --- .../main/java/com/juick/api/controllers/Messages.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'juick-api/src') diff --git a/juick-api/src/main/java/com/juick/api/controllers/Messages.java b/juick-api/src/main/java/com/juick/api/controllers/Messages.java index 8c3acc88..3e0f52c3 100644 --- a/juick-api/src/main/java/com/juick/api/controllers/Messages.java +++ b/juick-api/src/main/java/com/juick/api/controllers/Messages.java @@ -68,7 +68,7 @@ public class Messages { @RequestMapping("/messages") public ResponseEntity> getMessages( @RequestParam(required = false) String uname, - @RequestParam(defaultValue = "0") Integer before_mid, + @RequestParam(name = "before_mid", defaultValue = "0") Integer before, @RequestParam(required = false, defaultValue = "0") Integer daysback, @RequestParam(required = false) String withrecommended, @RequestParam(required = false) String popular, @@ -82,38 +82,38 @@ public class Messages { User user = userService.getUserByName(uname); if (user != null) { if (!StringUtils.isEmpty(media)) { - mids = messagesService.getUserPhotos(user.getUid(), 0, before_mid); + mids = messagesService.getUserPhotos(user.getUid(), 0, before); } else if (!StringUtils.isEmpty(tag)) { Tag tagObject = tagService.getTag(tag, false); if (tagObject != null) { - mids = messagesService.getUserTag(user.getUid(), tagObject.TID, 0, before_mid); + mids = messagesService.getUserTag(user.getUid(), tagObject.TID, 0, before); } else { return NOT_FOUND; } } else if (!StringUtils.isEmpty(withrecommended)) { - mids = messagesService.getUserBlogWithRecommendations(user.getUid(), 0, before_mid); + mids = messagesService.getUserBlogWithRecommendations(user.getUid(), 0, before); } else if (!StringUtils.isEmpty(daysback)) { mids = messagesService.getUserBlogAtDay(user.getUid(), 0, daysback); } else { - mids = messagesService.getUserBlog(user.getUid(), 0, before_mid); + mids = messagesService.getUserBlog(user.getUid(), 0, before); } } else { return NOT_FOUND; } } else { if (!StringUtils.isEmpty(popular)) { - mids = messagesService.getPopular(vuid, before_mid); + mids = messagesService.getPopular(vuid, before); } else if (!StringUtils.isEmpty(media)) { - mids = messagesService.getPhotos(vuid, before_mid); + mids = messagesService.getPhotos(vuid, before); } else if (!StringUtils.isEmpty(tag)) { Tag tagObject = tagService.getTag(tag, false); if (tagObject != null) { - mids = messagesService.getTag(tagObject.TID, vuid, before_mid, 20); + mids = messagesService.getTag(tagObject.TID, vuid, before, 20); } else { return NOT_FOUND; } } else { - mids = messagesService.getAll(vuid, before_mid); + mids = messagesService.getAll(vuid, before); } } return ResponseEntity.ok(messagesService.getMessages(mids)); -- cgit v1.2.3