Skip to content

Commit

Permalink
Feature(405666):delete api integration
Browse files Browse the repository at this point in the history
  • Loading branch information
GowthamKumarMVS committed Dec 26, 2024
1 parent 4370db4 commit 80a0784
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/app/api/workflowDesignerAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/app/services/workflow.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

0 comments on commit 80a0784

Please sign in to comment.