feat: Update endpoint signup
This commit is contained in:
parent
289e199da3
commit
cb7f037d4b
@ -1,14 +1,14 @@
|
|||||||
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: str
|
||||||
password: str
|
password: str
|
||||||
email: str
|
email: str
|
||||||
confirmationPassword: str
|
confirmationPassword: str
|
||||||
|
|
||||||
@router.post("/signup")
|
@router.post("/signup")
|
||||||
async def signup(user: UserRegistration):
|
async def signup(user: UserRegistration):
|
||||||
return {"message": "User registered successfully", "user": user.username}
|
return {"message": "User registered successfully", "user": user.username}
|
Loading…
x
Reference in New Issue
Block a user