修复因无JWT令牌而无法正确启动 Findreve

This commit is contained in:
2025-05-15 20:54:21 +08:00
parent 7fa1f2c088
commit d290b0f555
4 changed files with 8 additions and 5 deletions

View File

@@ -30,16 +30,14 @@ Router = APIRouter(
response_model=DefaultResponse,
response_description='当前为管理员'
)
async def verity_admin(
is_admin: Annotated[str, Depends(is_admin)]
) -> Literal[True]:
async def verity_admin() -> DefaultResponse:
'''
使用 API 验证是否为管理员。
- 若为管理员,返回 `True`
- 若不是管理员,抛出 `401` 错误
'''
return is_admin
return DefaultResponse(data=True)
@Router.get(
path='/items',