refactor(weknoracloud): update credential handling and configuration

- Replaced references to Docreader credentials with WeKnoraCloud credentials across multiple services and handlers.
- Introduced a new CredentialsConfig structure to manage third-party provider credentials, specifically for WeKnoraCloud.
- Updated database schema to include a credentials column for storing WeKnoraCloud AppID and AppSecret.
- Enhanced methods for retrieving and utilizing WeKnoraCloud credentials, ensuring proper encryption and decryption during storage and retrieval.

This update improves the management of WeKnoraCloud credentials, streamlining the integration and enhancing security measures.
This commit is contained in:
wizardchen
2026-04-15 10:55:39 +08:00
committed by lyingbug
parent 3b23dccd5c
commit 3f8201cd49
13 changed files with 150 additions and 91 deletions
@@ -89,7 +89,7 @@ func (e *weKnoraCloudEngine) FileTypes(_ bool) []string {
return []string{"docx", "doc", "pdf", "md", "markdown", "xlsx", "xls", "pptx", "ppt"}
}
func (e *weKnoraCloudEngine) CheckAvailable(docreaderConnected bool, overrides map[string]string) (bool, string) {
if overrides["docreader_app_id"] != "" {
if overrides["weknoracloud_app_id"] != "" {
return true, ""
}
return false, "WeKnora Cloud credentials not configured. Go to Settings → WeKnora Cloud to set up."