feat: add backend
This commit is contained in:
0
backend/modules/__init__.py
Normal file
0
backend/modules/__init__.py
Normal file
18
backend/modules/example.py
Normal file
18
backend/modules/example.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter(prefix="/example", tags=["example"])
|
||||
|
||||
|
||||
@router.get("/")
|
||||
async def list_items():
|
||||
return {"items": ["a", "b", "c"]}
|
||||
|
||||
|
||||
@router.get("/{item_id}")
|
||||
async def get_item(item_id: int):
|
||||
return {"id": item_id, "name": f"item_{item_id}"}
|
||||
|
||||
|
||||
@router.post("/")
|
||||
async def create_item():
|
||||
return {"status": "created"}
|
||||
12
backend/modules/voxy_import.py
Normal file
12
backend/modules/voxy_import.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter(prefix="/voxy_import", tags=["voxy_import"])
|
||||
|
||||
|
||||
@router.get("/")
|
||||
async def list_urls():
|
||||
return {
|
||||
"default": "https://dav.arinera.fun/voxy.zip",
|
||||
"cf": "https://oss.arinera.space/voxy.zip",
|
||||
"test": "http://local.arinera.fun:9000/oss/voxy.zip",
|
||||
}
|
||||
Reference in New Issue
Block a user