Update code in endpoints/signup.post.py

This commit is contained in:
Backend IM Bot 2025-03-16 15:05:45 +01:00
parent ddf16671bd
commit 66e7943e93

View File

@ -1,14 +1,15 @@
from fastapi import APIRouter, HTTPException from fastapi import APIRouter, Depends, HTTPException
from core.database import fake_users_db from core.database import fake_users_db
import uuid import uuid
router = APIRouter() router = APIRouter()
@router.post("/signup") @router.post("/signup")
async def signup_demo( async def signup_handler(
username: str = "new_user", username: str,
email: str = "user@example.com", email: str,
password: str = "securepassword123" password: str,
db: Session = Depends(get_db)
): ):
"""Demo signup endpoint""" """Demo signup endpoint"""
if username in fake_users_db: if username in fake_users_db:
@ -30,4 +31,4 @@ async def signup_demo(
"Verify your email (demo)", "Verify your email (demo)",
"Complete profile setup" "Complete profile setup"
] ]
} }