From 922f07763acfa6a11ab2db462dc76816ab268043 Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Sat, 19 Oct 2024 02:34:50 +0500 Subject: [PATCH] add debug mode var --- .env.example | 2 ++ api.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index ad79abb..cfc8ced 100644 --- a/.env.example +++ b/.env.example @@ -6,3 +6,5 @@ TOTP_SEED= #Cookie QL_0= IBSID= + +APP_DEBUG=true diff --git a/api.py b/api.py index 56219de..bcbd554 100644 --- a/api.py +++ b/api.py @@ -2,6 +2,8 @@ from flask import Flask, request, jsonify import subprocess import json from datetime import datetime, timedelta +import os +from dotenv import load_dotenv app = Flask(__name__) @@ -70,4 +72,5 @@ def verify_payment(): return jsonify({"success": False, "message": "Transaction not found, contact support"}) if __name__ == '__main__': - app.run(debug=True) + debug_mode = os.getenv('APP_DEBUG', 'False').lower() in ('true', '1', 't') + app.run(debug=debug_mode)