refactoring

This commit is contained in:
2025-07-17 03:45:44 +05:00
parent b79b0ae69f
commit 733977f56e
25 changed files with 300 additions and 363 deletions

12
app/api/capes.py Normal file
View File

@ -0,0 +1,12 @@
from fastapi import APIRouter, UploadFile, File
from app.services.cape import CapeService
router = APIRouter(tags=["Capes"])
@router.post("/user/{username}/cape")
async def set_cape(username: str, cape_file: UploadFile = File(...)):
return await CapeService().set_cape(username, cape_file)
@router.delete("/user/{username}/cape")
async def remove_cape(username: str):
return await CapeService().remove_cape(username)