Skip to content

Commit

Permalink
Fix verify api
Browse files Browse the repository at this point in the history
  • Loading branch information
jie65535 committed Jun 4, 2023
1 parent a084d39 commit 54e63d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -130,7 +130,7 @@ public static void handle(Context context) {
}
} else if (codes.containsKey(req.token)) {
if (req.action.equals("verify")) {
if (codes.get(req.token).equals(req.data)) {
if (codes.get(req.token) == (int)Double.parseDouble(req.data.toString())) {
codes.remove(req.token);
// update token expire time
client.tokenExpireTime = new Date(now.getTime() + config.tokenLastUseExpirationTime_H * 60L * 60L * 1000L);
Expand Down
Expand Up @@ -148,7 +148,7 @@ public void timeout() {
}
} else if (codes.containsKey(req.token)) {
if (req.action.equals("verify")) {
if (codes.get(req.token).equals(req.data)) {
if (codes.get(req.token) == (int)Double.parseDouble(req.data.toString())) {
codes.remove(req.token);
// update token expire time
client.tokenExpireTime = new Date(now.getTime() + config.tokenLastUseExpirationTime_H * 60L * 60L * 1000L);
Expand Down

0 comments on commit 54e63d3

Please sign in to comment.