feat: Update endpoint /comments
This commit is contained in:
parent
2304905755
commit
e692e9b4de
@ -1,13 +1,13 @@
|
||||
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):
|
||||
from fastapi import APIRouter, HTTPException
|
||||
from pydantic import BaseModel
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
class UserRegistration(BaseModel):
|
||||
username: "sam"
|
||||
password: str
|
||||
email: str
|
||||
|
||||
@router.post("/signup")
|
||||
async def signup(user: UserRegistration):
|
||||
return {"message": "User registered successfully. Whooo!", "user": user.username}
|
Loading…
x
Reference in New Issue
Block a user