Compare commits
	
		
			2 Commits
		
	
	
		
			0105b9539a
			...
			e3fce36c89
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| e3fce36c89 | |||
| 6741fb6eb1 | 
| @ -1,5 +1,5 @@ | ||||
| [tool.bumpversion] | ||||
| current_version = "1.3.7" | ||||
| current_version = "1.3.8" | ||||
| commit = true | ||||
| tag = true | ||||
| tag_name = "{new_version}" | ||||
|  | ||||
| @ -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 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user