mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-02 10:39:13 +00:00
update seach source connector schema
This commit is contained in:
parent
8958970320
commit
161d9c7b91
1 changed files with 12 additions and 0 deletions
|
@ -167,6 +167,18 @@ class SearchSourceConnectorBase(BaseModel):
|
||||||
if not config.get("CONFLUENCE_BASE_URL"):
|
if not config.get("CONFLUENCE_BASE_URL"):
|
||||||
raise ValueError("CONFLUENCE_BASE_URL cannot be empty")
|
raise ValueError("CONFLUENCE_BASE_URL cannot be empty")
|
||||||
|
|
||||||
|
elif connector_type == SearchSourceConnectorType.CLICKUP_CONNECTOR:
|
||||||
|
# For CLICKUP_CONNECTOR, only allow CLICKUP_API_TOKEN
|
||||||
|
allowed_keys = ["CLICKUP_API_TOKEN"]
|
||||||
|
if set(config.keys()) != set(allowed_keys):
|
||||||
|
raise ValueError(
|
||||||
|
f"For CLICKUP_CONNECTOR connector type, config must only contain these keys: {allowed_keys}"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Ensure the API token is not empty
|
||||||
|
if not config.get("CLICKUP_API_TOKEN"):
|
||||||
|
raise ValueError("CLICKUP_API_TOKEN cannot be empty")
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue