17 lines
498 B
Python
17 lines
498 B
Python
from fastapi import APIRouter, HTTPException
|
|
from pydantic import BaseModel
|
|
|
|
router = APIRouter()
|
|
|
|
class UserRegistration(BaseModel):
|
|
username: str
|
|
password: str
|
|
email: str
|
|
|
|
@router.get("/countries")
|
|
async def get_countries(user: UserRegistration):
|
|
return {"message": "User registered successfully", "user": user.username}
|
|
|
|
@router.delete("/countries")
|
|
async def delete_countries(user: UserRegistration):
|
|
return {"message": "User registered successfully", "user": user.username} |