feat: 增加桌面端登录、视频清单和封面缓存
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
from collections.abc import Callable
|
||||
from typing import TypeVar
|
||||
|
||||
from fastapi import HTTPException
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
|
||||
def call(action: Callable[[], T]) -> T:
|
||||
try:
|
||||
return action()
|
||||
except RuntimeError as exc:
|
||||
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
||||
Reference in New Issue
Block a user