feat: Update endpoint login
This commit is contained in:
parent
53a7e306f9
commit
8a12443bd2
@ -1,7 +1,13 @@
|
||||
from fastapi import APIRouter
|
||||
from fastapi import APIRouter, HTTPException
|
||||
from pydantic import BaseModel
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.post("/login")
|
||||
async def login(username: str, password: str):
|
||||
return {"message": "User logged in successfully", "username": username}
|
||||
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