mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 19:37:47 +01:00
refac
This commit is contained in:
@@ -2216,16 +2216,17 @@ async def get_app_config(request: Request):
|
||||
if data is not None and "id" in data:
|
||||
user = Users.get_user_by_id(data["id"])
|
||||
|
||||
user_count = 0
|
||||
onboarding = False
|
||||
if user is None:
|
||||
user_count = Users.get_num_users()
|
||||
onboarding = user_count == 0
|
||||
|
||||
return {
|
||||
**({"onboarding": True} if onboarding else {}),
|
||||
"status": True,
|
||||
"name": WEBUI_NAME,
|
||||
"version": VERSION,
|
||||
"default_locale": str(DEFAULT_LOCALE),
|
||||
**({"onboarding": True} if user_count is 0 else {}),
|
||||
"oauth": {
|
||||
"providers": {
|
||||
name: config.get("name", name)
|
||||
|
||||
Reference in New Issue
Block a user