mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 09:17:06 +08:00
perf: User change ws api
This commit is contained in:
@@ -101,7 +101,7 @@ async def ws_change(session: SessionDep, current_user: CurrentUser, trans:Trans,
|
||||
if not any(x.id == oid for x in ws_list):
|
||||
db_ws = session.get(WorkspaceModel, oid)
|
||||
if db_ws:
|
||||
raise Exception(trans('i18n_user.user_ws_miss', msg = db_ws.name))
|
||||
raise Exception(trans('i18n_user.ws_miss', ws = db_ws.name))
|
||||
raise Exception(trans('i18n_not_exist', msg = f"{trans('i18n_ws.title')}[{oid}]"))
|
||||
user_model: UserModel = get_db_user(session = session, user_id = current_user.id)
|
||||
user_model.oid = oid
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"email": "Email",
|
||||
"password": "Password",
|
||||
"language_not_support": "System does not support [{key}] language!",
|
||||
"user_ws_miss:": "The current user is not in the workspace [{msg}]!"
|
||||
"ws_miss": "The current user is not in the workspace [{ws}]!"
|
||||
},
|
||||
"i18n_ws": {
|
||||
"title": "Workspace"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"email": "邮箱",
|
||||
"password": "密码",
|
||||
"language_not_support": "系统不支持[{key}]语言!",
|
||||
"user_ws_miss:": "当前用户不在工作空间[{msg}]中!"
|
||||
"ws_miss": "当前用户不在工作空间[{ws}]中!"
|
||||
},
|
||||
"i18n_ws": {
|
||||
"title": "工作空间"
|
||||
|
||||
Reference in New Issue
Block a user