13 lines
333 B
Python
13 lines
333 B
Python
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 yes", "user": user.username} |