Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ def validate_token(token):
|
|
| 25 |
if user["token"] == token:
|
| 26 |
expiration_time = datetime.fromisoformat(user["token_expiration_time"])
|
| 27 |
if datetime.now() < expiration_time:
|
| 28 |
-
return True
|
| 29 |
else:
|
| 30 |
return False, "Token has expired."
|
| 31 |
return False, "Token not found."
|
|
|
|
| 25 |
if user["token"] == token:
|
| 26 |
expiration_time = datetime.fromisoformat(user["token_expiration_time"])
|
| 27 |
if datetime.now() < expiration_time:
|
| 28 |
+
return True, None # Token is valid, no error message
|
| 29 |
else:
|
| 30 |
return False, "Token has expired."
|
| 31 |
return False, "Token not found."
|