Update code in endpoints/signup.post.py
This commit is contained in:
parent
ddf16671bd
commit
66e7943e93
@ -1,14 +1,15 @@
|
||||
from fastapi import APIRouter, HTTPException
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from core.database import fake_users_db
|
||||
import uuid
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.post("/signup")
|
||||
async def signup_demo(
|
||||
username: str = "new_user",
|
||||
email: str = "user@example.com",
|
||||
password: str = "securepassword123"
|
||||
async def signup_handler(
|
||||
username: str,
|
||||
email: str,
|
||||
password: str,
|
||||
db: Session = Depends(get_db)
|
||||
):
|
||||
"""Demo signup endpoint"""
|
||||
if username in fake_users_db:
|
||||
|
Loading…
x
Reference in New Issue
Block a user