aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/api/Users.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-01-15 15:54:04 +0300
committerGravatar Vitaly Takmazov2016-01-15 15:54:04 +0300
commit30068e18a3d8ae37b509f5cd766515735a818692 (patch)
treec2028e65a088ff07393387cffc0b6ce7d2ddf9cb /src/main/java/com/juick/api/Users.java
parentabf2c56ab5bc2363a4f33f6f72b90396a9fd3df9 (diff)
update core
Diffstat (limited to 'src/main/java/com/juick/api/Users.java')
-rw-r--r--src/main/java/com/juick/api/Users.java20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/main/java/com/juick/api/Users.java b/src/main/java/com/juick/api/Users.java
index d3818a5a..57f8c4b9 100644
--- a/src/main/java/com/juick/api/Users.java
+++ b/src/main/java/com/juick/api/Users.java
@@ -27,7 +27,9 @@ public class Users {
this.sql = sql;
}
- public void doGetUsers(HttpServletRequest request, HttpServletResponse response, int vuid) throws ServletException, IOException {
+ public void doGetUsers(HttpServletRequest request,
+ HttpServletResponse response, int vuid)
+ throws ServletException, IOException {
List<com.juick.User> users = new ArrayList<>();
String punames[] = request.getParameterValues("uname");
@@ -66,7 +68,9 @@ public class Users {
}
}
- public void doGetUserRead(HttpServletRequest request, HttpServletResponse response, int vuid) throws ServletException, IOException {
+ public void doGetUserRead(HttpServletRequest request,
+ HttpServletResponse response, int vuid)
+ throws ServletException, IOException {
int uid = 0;
String uname = request.getParameter("uname");
if (uname == null) {
@@ -74,8 +78,8 @@ public class Users {
} else {
if (UserQueries.checkUserNameValid(uname)) {
com.juick.User u = UserQueries.getUserByName(sql, uname);
- if (u != null && u.UID > 0) {
- uid = u.UID;
+ if (u != null && u.getUID() > 0) {
+ uid = u.getUID();
}
}
}
@@ -94,7 +98,9 @@ public class Users {
response.sendError(404);
}
- public void doGetUserReaders(HttpServletRequest request, HttpServletResponse response, int vuid) throws ServletException, IOException {
+ public void doGetUserReaders(HttpServletRequest request,
+ HttpServletResponse response, int vuid)
+ throws ServletException, IOException {
int uid = 0;
String uname = request.getParameter("uname");
if (uname == null) {
@@ -102,8 +108,8 @@ public class Users {
} else {
if (UserQueries.checkUserNameValid(uname)) {
com.juick.User u = UserQueries.getUserByName(sql, uname);
- if (u != null && u.UID > 0) {
- uid = u.UID;
+ if (u != null && u.getUID() > 0) {
+ uid = u.getUID();
}
}
}