feat: 增加桌面端登录、视频清单和封面缓存
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
from server.errors import call
|
||||
from server.schemas import ProxyBody
|
||||
from server.services.http import http
|
||||
|
||||
router = APIRouter(prefix="/api")
|
||||
|
||||
|
||||
@router.post("/proxy")
|
||||
def set_proxy(body: ProxyBody):
|
||||
return call(lambda: _apply(body))
|
||||
|
||||
|
||||
def _apply(body: ProxyBody) -> dict:
|
||||
http.configure_proxy(body.model_dump())
|
||||
return {"ok": True}
|
||||
Reference in New Issue
Block a user