diff options
Diffstat (limited to 'src/main/java/com/juick/api/Utils.java')
-rw-r--r-- | src/main/java/com/juick/api/Utils.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/juick/api/Utils.java b/src/main/java/com/juick/api/Utils.java index 10e0cccb..db73fdaa 100644 --- a/src/main/java/com/juick/api/Utils.java +++ b/src/main/java/com/juick/api/Utils.java @@ -27,6 +27,7 @@ import java.util.ArrayList; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.springframework.jdbc.core.JdbcTemplate; import sun.misc.BASE64Decoder; /** @@ -47,7 +48,7 @@ public class Utils { return null; } - public static com.juick.User getVisitorUser(Connection sql, HttpServletRequest request) { + public static com.juick.User getVisitorUser(JdbcTemplate sql, HttpServletRequest request) { String hash = getCookie(request, "hash"); if (hash != null) { return com.juick.server.UserQueries.getUserByHash(sql, hash); @@ -56,7 +57,7 @@ public class Utils { } } - public static int getVisitorUID(Connection sql, HttpServletRequest request) { + public static int getVisitorUID(JdbcTemplate sql, HttpServletRequest request) { Cookie cookies[] = request.getCookies(); if (cookies != null) { for (int i = 0; i < cookies.length; i++) { @@ -84,7 +85,7 @@ public class Utils { return 0; } - public static int getVisitorQueryStringUID(Connection sql, HttpServletRequest request) { + public static int getVisitorQueryStringUID(JdbcTemplate sql, HttpServletRequest request) { String hash = request.getParameter("hash"); if (hash != null && hash.length() == 16) { return com.juick.server.UserQueries.getUIDbyHash(sql, hash); |