feat: Delete POST endpoint signup
This commit is contained in:
parent
046867c788
commit
c00feba365
@ -1,33 +0,0 @@
|
||||
from fastapi import APIRouter, 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"
|
||||
):
|
||||
"""Demo signup endpoint"""
|
||||
if username in fake_users_db:
|
||||
raise HTTPException(status_code=400, detail="Username already exists")
|
||||
|
||||
user_id = str(uuid.uuid4())
|
||||
fake_users_db[username] = {
|
||||
"id": user_id,
|
||||
"email": email,
|
||||
"password": password,
|
||||
"disabled": False
|
||||
}
|
||||
|
||||
return {
|
||||
"message": "User created successfully",
|
||||
"user_id": user_id,
|
||||
"username": username,
|
||||
"next_steps": [
|
||||
"Verify your email (demo)",
|
||||
"Complete profile setup"
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user