aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-03-10 20:36:14 +0300
committerGravatar Vitaly Takmazov2017-03-10 20:36:14 +0300
commit64bf33c905e069bd9171198998c82159b3b07904 (patch)
tree517e9d80d5ec65ba12d04e72bfd7d22803553ea8 /juick-api/src/main/java/com
parentd05897b15a84b3ac51fe8f123baeef948a371e24 (diff)
juick-api: rename before_mid variable
Diffstat (limited to 'juick-api/src/main/java/com')
-rw-r--r--juick-api/src/main/java/com/juick/api/controllers/Messages.java18
1 files changed, 9 insertions, 9 deletions
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<List<com.juick.Message>> 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));