修复fl的登录bug

This commit is contained in:
cxykevin 2024-08-26 18:32:00 +08:00
parent 1551d554e4
commit 4ab78ff7e5
1 changed files with 1 additions and 2 deletions

View File

@ -69,8 +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)
username = await check_apikey('/'.join(list(apikey)))
if (username == ""):
return {"msg": "token无效"}
if (flarum_session is None):