feat: Add POST endpoint signup4
This commit is contained in:
parent
433eceaf66
commit
c063f33a91
12
app/api/endpoints/signup4.py
Normal file
12
app/api/endpoints/signup4.py
Normal file
@ -0,0 +1,12 @@
|
||||
from fastapi import APIRouter, HTTPException
|
||||
from pydantic import BaseModel
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
class UserRegistration(BaseModel):
|
||||
username: str
|
||||
password: str
|
||||
email: str
|
||||
@router.post("/signup")
|
||||
async def signup(user: UserRegistration):
|
||||
return {"message": "User registered successfully", "user": user.username}
|
Loading…
x
Reference in New Issue
Block a user