V1.2.0 alpha 1

- 支持使用 api 提交物品信息
- 支持 JWT 鉴权
This commit is contained in:
2025-03-28 04:53:37 +08:00
parent 3ff07b89de
commit 7d0d59677d
18 changed files with 695 additions and 247 deletions

7
JWT.py Normal file
View File

@@ -0,0 +1,7 @@
from fastapi.security import OAuth2PasswordBearer
from model import database
import asyncio
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/api/token")
SECRET_KEY = asyncio.run(database.Database().get_setting('SECRET_KEY'))