refactor: refactor webui structure

This commit is contained in:
2025-04-24 02:23:26 +08:00
parent 68aa13e216
commit eb8f0be004
87 changed files with 407 additions and 385 deletions

View File

@@ -1,8 +1,13 @@
AUTH_TYPE = "oidc" # or oidc
HOST="konobangu.com"
DATABASE_URL = "postgres://konobangu:konobangu@localhost:5432/konobangu"
STORAGE_DATA_DIR = "./data"
AUTH_TYPE = "basic" # or oidc
BASIC_USER = "konobangu"
BASIC_PASSWORD = "konobangu"
OIDC_ISSUER="https://auth.logto.io/oidc"
OIDC_AUDIENCE = "https://konobangu.com/api"
OIDC_CLIENT_ID = "client_id"
OIDC_CLIENT_SECRET = "client_secret" # optional
OIDC_EXTRA_SCOPES = "read:konobangu write:konobangu"
# OIDC_ISSUER="https://auth.logto.io/oidc"
# OIDC_AUDIENCE = "https://konobangu.com/api"
# OIDC_CLIENT_ID = "client_id"
# OIDC_CLIENT_SECRET = "client_secret" # optional
# OIDC_EXTRA_SCOPES = "read:konobangu write:konobangu"
# OIDC_EXTRA_CLAIM_KEY = ""
# OIDC_EXTRA_CLAIM_VALUE = ""

View File

@@ -157,12 +157,7 @@ where
None => Ok(()),
}
}
field => Err(AuthError::from_graphql_subscribe_id_guard(
async_graphql::Error::new("unsupport graphql field"),
context,
field,
"",
)),
_ => Ok(()),
};
match validation_result {
Ok(_) => GuardAction::Allow,