Files
popa_minecraft_launcher_api/app/api/capes.py
2025-07-17 03:45:44 +05:00

13 lines
428 B
Python

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)