修复flarum登录bug

This commit is contained in:
cxykevin 2024-08-26 17:53:45 +08:00
parent 7c24a7e965
commit 1551d554e4
1 changed files with 1 additions and 0 deletions

View File

@ -69,6 +69,7 @@ def main(app: FastAPI, ROOT: str, apikeys: dict):
@app.post("/app/flarum/login")
async def login(apikey: str, csrftoken: str, resp: Response, flarum_session: Annotated[str | None, Cookie()] = None):
apikey = apikey.replace("/", "")
username = await check_apikey(apikey)
if (username == ""):
return {"msg": "token无效"}