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