diff --git a/src/app/api/workflowDesignerAPI.ts b/src/app/api/workflowDesignerAPI.ts index 7e3a8fd..789b5eb 100644 --- a/src/app/api/workflowDesignerAPI.ts +++ b/src/app/api/workflowDesignerAPI.ts @@ -5,7 +5,7 @@ export interface WorkflowListPathsType { const apiPaths: WorkflowListPathsType = { updateWorkflowRules: `{baseUrl}/{workflowId}/rules/{ruleId}/update`, - deleteWorkflowRules: `{baseUrl}/rules/{ruleId}/delete`, + deleteWorkflowRules: `{baseUrl}/{ruleId}/rules`, } export const WorkflowApiPaths: WorkflowListPathsType = apiPaths; \ No newline at end of file diff --git a/src/app/components/workflow-diagram/workflow-diagram.component.ts b/src/app/components/workflow-diagram/workflow-diagram.component.ts index 5c733d0..7167071 100644 --- a/src/app/components/workflow-diagram/workflow-diagram.component.ts +++ b/src/app/components/workflow-diagram/workflow-diagram.component.ts @@ -17,7 +17,7 @@ import { DropDownListModule, MultiSelectModule } from '@syncfusion/ej2-angular-d import { NumericTextBoxModule, TextAreaModule, TextBoxModule, UploaderModule } from '@syncfusion/ej2-angular-inputs'; import { DatePickerModule, DateTimePickerModule } from '@syncfusion/ej2-angular-calendars'; import { TextFormatEnum, ChatWorkflowEditorTypeEnum, ChatWorkflowBlockTypeEnum } from '../../models/enum'; -import { ButtonModule } from '@syncfusion/ej2-angular-buttons'; +import { ButtonModule, SwitchModule } from '@syncfusion/ej2-angular-buttons'; import sampleWorkflowData from '../../data/sample-workflow-data.json'; // Adjust the path as needed import { AsyncSettingsModel, FileInfo, Uploader } from '@syncfusion/ej2-inputs'; import { WorkflowSidebarComponent } from '../workflow-sidebar/workflow-sidebar.component'; // Import child component diff --git a/src/app/services/workflow.service.ts b/src/app/services/workflow.service.ts index afe7f68..94ac924 100644 --- a/src/app/services/workflow.service.ts +++ b/src/app/services/workflow.service.ts @@ -25,10 +25,10 @@ export class WorkflowService { } deleteRule(ruleId: number): Promise<{ message: string }> { - const url = WorkflowApiPaths.updateWorkflowRules + const url = WorkflowApiPaths.deleteWorkflowRules .replace('{baseUrl}', this.baseUrl) .replace('{ruleId}', ruleId.toString()); - return this.http.put<{ message: string }>(url, this.httpOptions).toPromise(); + return this.http.delete<{ message: string }>(url, this.httpOptions).toPromise(); } }