From 5ff660e5f3e73382781f854a0afc350d2ad6d626 Mon Sep 17 00:00:00 2001 From: Alexander Alexeev Date: Sun, 11 Dec 2016 00:00:35 +0700 Subject: duplicated util method is removed --- juick-api/src/main/java/com/juick/api/controllers/PM.java | 3 ++- juick-api/src/main/java/com/juick/api/controllers/Users.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'juick-api/src/main/java/com/juick/api/controllers') 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(); -- cgit v1.2.3