aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com/juick/api/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'juick-api/src/main/java/com/juick/api/controllers')
-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));