Spaces:
Running
Running
Ved Gupta commited on
Commit ·
9d9b02c
1
Parent(s): 2f43b92
things gonna change
Browse files- .env.example +1 -3
- app/api/endpoints/users.py +0 -1
- app/core/config.py +1 -1
- app/utils/utils.py +12 -1
.env.example
CHANGED
|
@@ -12,6 +12,4 @@ POSTGRES_SERVER=your_postgres_server
|
|
| 12 |
POSTGRES_USER=your_postgres_user
|
| 13 |
POSTGRES_PASSWORD=your_postgres_password
|
| 14 |
POSTGRES_DB=your_postgres_db
|
| 15 |
-
POSTGRES_DATABASE_URL=postgresql://your_postgres_user:your_postgres_password@your_postgres_server/your_postgres_db
|
| 16 |
-
|
| 17 |
-
TEST_DATABASE_URL=postgresql://your_postgres_user:your_postgres_password@your_test_postgres_server/your_test_postgres_db
|
|
|
|
| 12 |
POSTGRES_USER=your_postgres_user
|
| 13 |
POSTGRES_PASSWORD=your_postgres_password
|
| 14 |
POSTGRES_DB=your_postgres_db
|
| 15 |
+
POSTGRES_DATABASE_URL=postgresql://your_postgres_user:your_postgres_password@your_postgres_server/your_postgres_db
|
|
|
|
|
|
app/api/endpoints/users.py
CHANGED
|
@@ -7,7 +7,6 @@ from app.core.security import get_password_hash, verify_password
|
|
| 7 |
from app.core.models import UserInDB
|
| 8 |
|
| 9 |
database = SessionLocal()
|
| 10 |
-
|
| 11 |
users_router = router = APIRouter()
|
| 12 |
|
| 13 |
|
|
|
|
| 7 |
from app.core.models import UserInDB
|
| 8 |
|
| 9 |
database = SessionLocal()
|
|
|
|
| 10 |
users_router = router = APIRouter()
|
| 11 |
|
| 12 |
|
app/core/config.py
CHANGED
|
@@ -22,7 +22,7 @@ class Settings(BaseSettings):
|
|
| 22 |
POSTGRES_PASSWORD: str = env.get("POSTGRES_PASSWORD")
|
| 23 |
POSTGRES_DB: str = env.get("POSTGRES_DB")
|
| 24 |
POSTGRES_DATABASE_URL: str = env.get("POSTGRES_DATABASE_URL")
|
| 25 |
-
TEST_DATABASE_URL: str = env.get("
|
| 26 |
|
| 27 |
BACKEND_CORS_ORIGINS: List[AnyHttpUrl] = ["http://localhost:3000"]
|
| 28 |
|
|
|
|
| 22 |
POSTGRES_PASSWORD: str = env.get("POSTGRES_PASSWORD")
|
| 23 |
POSTGRES_DB: str = env.get("POSTGRES_DB")
|
| 24 |
POSTGRES_DATABASE_URL: str = env.get("POSTGRES_DATABASE_URL")
|
| 25 |
+
TEST_DATABASE_URL: str = env.get("POSTGRES_DATABASE_URL")
|
| 26 |
|
| 27 |
BACKEND_CORS_ORIGINS: List[AnyHttpUrl] = ["http://localhost:3000"]
|
| 28 |
|
app/utils/utils.py
CHANGED
|
@@ -16,4 +16,15 @@ def get_all_routes(app):
|
|
| 16 |
|
| 17 |
def print_routes(app):
|
| 18 |
routes = get_all_routes(app)
|
| 19 |
-
print(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
def print_routes(app):
|
| 18 |
routes = get_all_routes(app)
|
| 19 |
+
print("\n\n")
|
| 20 |
+
print("Path" + " " * 45 + "Name" + " " * 45 + "Methods")
|
| 21 |
+
print("-" * 105)
|
| 22 |
+
for route in routes:
|
| 23 |
+
print(
|
| 24 |
+
f"{route['path']}"
|
| 25 |
+
+ " " * (48 - len(route["path"]))
|
| 26 |
+
+ f"{route['name']}"
|
| 27 |
+
+ " " * (48 - len(route["name"]))
|
| 28 |
+
+ f"{', '.join(route['methods'])}"
|
| 29 |
+
)
|
| 30 |
+
print("\n")
|