Compare commits

...

2 Commits

Author SHA1 Message Date
e3fce36c89 Bump version: 1.3.7 → 1.3.8
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 1m29s
2025-08-10 17:27:14 +01:00
6741fb6eb1 expiary check 2025-08-10 17:26:15 +01:00
3 changed files with 12 additions and 2 deletions

View File

@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "1.3.7"
current_version = "1.3.8"
commit = true
tag = true
tag_name = "{new_version}"

View File

@ -1 +1 @@
1.3.7
1.3.8

View File

@ -138,6 +138,16 @@ def validate_account() -> Tuple[Response, int]:
200,
)
# Check if account is expired
exp_date_str = result["data"]["user_info"]["exp_date"]
if exp_date_str:
from datetime import datetime, timezone
exp_date = datetime.fromtimestamp(int(exp_date_str), tz=timezone.utc)
current_date = datetime.now(timezone.utc)
if current_date > exp_date:
return jsonify({"message": "Account is expired", "data": result}), 401
return jsonify({"message": "Account is valid", "data": result}), 200
else:
return jsonify({"message": "Account is invalid"}), 401