add bypass (test only)

This commit is contained in:
Sola
2015-12-10 12:10:58 +08:00
parent d24075f2ce
commit 02c99609f6
4 changed files with 23 additions and 20 deletions

View File

@@ -53,6 +53,13 @@ public class Authorize extends HttpServlet {
}
Long l = fetchedTime.remove(wechat);
Command c = fetchedCommand.remove(wechat);
// FIXME: 2015/12/10 FOR TEST ONLY
if (request.getParameter("bypass") != null) {
c = Command.fromId(Integer.parseInt(request.getParameter("bypass")));
l = System.currentTimeMillis();
}
if (l == null || c == null) {
return new Response(Response.ResponseCode.AUTHORIZE_FAILED);
}