mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-12 22:42:13 +02:00
Fix: Ensure full Slack connector configuration is saved
I've modified `useConnectorEditPage.ts` to correctly save all Slack connector settings. - I updated `editConnectorSchema` in `types.ts` to include a `config` field in `EditConnectorFormValues`. - I replaced the `handleSaveChanges` function in `useConnectorEditPage.ts` with a version that reads the complete Slack configuration from `formData.config` (populated by `EditSlackConnectorConfigForm` and channel selection). - This ensures that settings like `slack_selected_channel_ids`, `slack_membership_filter_type`, and other Slack-specific options are included in the payload to the backend and persisted correctly. - I updated post-save logic to correctly reset the form's `config` field for Slack connectors. This addresses the issue where changes to Slack connector configurations, other than just the bot token, were not being saved.
This commit is contained in:
parent
9fc5f6589b
commit
95b3d97800
2 changed files with 153 additions and 73 deletions
|
|
@ -31,5 +31,6 @@ export const editConnectorSchema = z.object({
|
|||
TAVILY_API_KEY: z.string().optional(),
|
||||
LINEAR_API_KEY: z.string().optional(),
|
||||
LINKUP_API_KEY: z.string().optional(),
|
||||
config: z.record(z.string(), z.any()).optional(), // Added for generic config object
|
||||
});
|
||||
export type EditConnectorFormValues = z.infer<typeof editConnectorSchema>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue