diff --git a/README.md b/README.md index 806234e..b2b24c4 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,8 @@ Then, open the `.env` file and add the following: # Environment Variables VALID_API_KEY=testtest-api-key-12345 VALID_APP_ID=app1 +SWAGGER_URL="/documentation" +API_URL="/swagger.json" ``` This ensures that the application uses secure API keys and app IDs. diff --git a/app/api/routes/routes.py b/app/api/routes/routes.py index 874fde0..01b6092 100644 --- a/app/api/routes/routes.py +++ b/app/api/routes/routes.py @@ -32,6 +32,7 @@ def swagger_json(): return send_from_directory(swagger_dir, "digifi_swagger.json") + @api.route('/swagger/') def serve_paths(filename): swagger_dir = os.path.join("swagger") diff --git a/app/config.py b/app/config.py index 48c319a..ad0fb13 100644 --- a/app/config.py +++ b/app/config.py @@ -6,6 +6,10 @@ class Config: SWAGGER_URL = os.getenv("SWAGGER_URL", "/documentation") API_URL = os.getenv("API_URL", "/swagger.json") + DEBUG = True + VALID_APP_ID = os.getenv("VALID_APP_ID", "app1") + VALID_API_KEY = os.getenv("VALID_API_KEY", "test-api-key-12345") + # SQLALCHEMY_DATABASE_URI =os.environ.get("DATABASE_URL", "database_url") # SQLALCHEMY_TRACK_MODIFICATIONS = False # SECRET_KEY = os.environ.get("SECRET_KEY", "your_secret_key")