refactoring
This commit is contained in:
12
app/api/skins.py
Normal file
12
app/api/skins.py
Normal file
@ -0,0 +1,12 @@
|
||||
from fastapi import APIRouter, UploadFile, File, Form
|
||||
from app.services.skin import SkinService
|
||||
|
||||
router = APIRouter(tags=["Skins"])
|
||||
|
||||
@router.post("/user/{username}/skin")
|
||||
async def set_skin(username: str, skin_file: UploadFile = File(...), skin_model: str = Form("classic")):
|
||||
return await SkinService().set_skin(username, skin_file, skin_model)
|
||||
|
||||
@router.delete("/user/{username}/skin")
|
||||
async def remove_skin(username: str):
|
||||
return await SkinService().remove_skin(username)
|
Reference in New Issue
Block a user