diff options
author | Alexander Alexeev | 2016-12-11 00:00:35 +0700 |
---|---|---|
committer | Vitaly Takmazov | 2016-12-11 18:24:37 +0300 |
commit | 5ff660e5f3e73382781f854a0afc350d2ad6d626 (patch) | |
tree | ab6ab4447c08d80dd3aa467daee3080b1b775395 /juick-api/src/main/java/com/juick/api | |
parent | b1861f326a834865f1d700745dfb5f1b1596ba1f (diff) |
duplicated util method is removed
Diffstat (limited to 'juick-api/src/main/java/com/juick/api')
-rw-r--r-- | juick-api/src/main/java/com/juick/api/controllers/PM.java | 3 | ||||
-rw-r--r-- | juick-api/src/main/java/com/juick/api/controllers/Users.java | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/juick-api/src/main/java/com/juick/api/controllers/PM.java b/juick-api/src/main/java/com/juick/api/controllers/PM.java index ffbea4b5..478ca75e 100644 --- a/juick-api/src/main/java/com/juick/api/controllers/PM.java +++ b/juick-api/src/main/java/com/juick/api/controllers/PM.java @@ -7,6 +7,7 @@ import com.juick.server.util.HttpForbiddenException; import com.juick.service.PMQueriesService; import com.juick.service.UserService; import com.juick.util.UserUtils; +import com.juick.util.WebUtils; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -69,7 +70,7 @@ public class PM { throw new HttpForbiddenException(); } int uid = 0; - if (UserUtils.checkUserNameValid(uname)) { + if (WebUtils.isUserName(uname)) { uid = userService.getUIDbyName(uname); } diff --git a/juick-api/src/main/java/com/juick/api/controllers/Users.java b/juick-api/src/main/java/com/juick/api/controllers/Users.java index d6035cf2..78f6175f 100644 --- a/juick-api/src/main/java/com/juick/api/controllers/Users.java +++ b/juick-api/src/main/java/com/juick/api/controllers/Users.java @@ -68,7 +68,7 @@ public class Users { if (uname == null) { uid = vuid; } else { - if (UserUtils.checkUserNameValid(uname)) { + if (WebUtils.isUserName(uname)) { com.juick.User u = userService.getUserByName(uname); if (u != null && u.getUid() > 0) { uid = u.getUid(); @@ -102,7 +102,7 @@ public class Users { if (uname == null) { uid = vuid; } else { - if (UserUtils.checkUserNameValid(uname)) { + if (WebUtils.isUserName(uname)) { com.juick.User u = userService.getUserByName(uname); if (u != null && u.getUid() > 0) { uid = u.getUid(); |