forked from cxykevin/sacn_accout_system
修复flarum登录bug
This commit is contained in:
parent
7c24a7e965
commit
1551d554e4
|
@ -69,6 +69,7 @@ def main(app: FastAPI, ROOT: str, apikeys: dict):
|
||||||
|
|
||||||
@app.post("/app/flarum/login")
|
@app.post("/app/flarum/login")
|
||||||
async def login(apikey: str, csrftoken: str, resp: Response, flarum_session: Annotated[str | None, Cookie()] = None):
|
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(apikey)
|
||||||
if (username == ""):
|
if (username == ""):
|
||||||
return {"msg": "token无效"}
|
return {"msg": "token无效"}
|
||||||
|
|
Loading…
Reference in New Issue