mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: Assistant asks about the process of mathematical thinking internationalization error
This commit is contained in:
committed by
fit2cloud-chenyw
parent
7668a6f851
commit
d2556a4231
@@ -39,6 +39,8 @@ class TokenMiddleware(BaseHTTPMiddleware):
|
||||
validator: tuple[any] = await self.validateAssistant(assistantToken, trans)
|
||||
if validator[0]:
|
||||
request.state.current_user = validator[1]
|
||||
if request.state.current_user and trans.lang:
|
||||
request.state.current_user.language = trans.lang
|
||||
request.state.assistant = validator[2]
|
||||
origin = request.headers.get("X-SQLBOT-HOST-ORIGIN") or get_origin_from_referer(request)
|
||||
if origin and validator[2]:
|
||||
|
||||
Reference in New Issue
Block a user