perf: User change ws api

This commit is contained in:
fit2cloud-chenyw
2025-07-28 10:53:02 +08:00
parent c3622230d9
commit 27993f4007
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -17,7 +17,7 @@
"email": "邮箱",
"password": "密码",
"language_not_support": "系统不支持[{key}]语言!",
"user_ws_miss:": "当前用户不在工作空间[{msg}]中!"
"ws_miss": "当前用户不在工作空间[{ws}]中!"
},
"i18n_ws": {
"title": "工作空间"