mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(editor): Remove the restApi mixin (#6065)
* ✨ Removing the `makeApiRequest` method from `restAPI` mixin, removing the mixing from the App component * ✨ Removing `restApi` mixin * 👕 Fixing lint errors * ✔️ Fixing execution list unit tests and merge bug in workflowRun mixin * 🐛 Added missing useStore
This commit is contained in:
committed by
GitHub
parent
4bd55f7a1e
commit
59db96771e
@@ -327,7 +327,6 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
import { externalHooks } from '@/mixins/externalHooks';
|
||||
import { restApi } from '@/mixins/restApi';
|
||||
import { genericHelpers } from '@/mixins/genericHelpers';
|
||||
import { showMessage } from '@/mixins/showMessage';
|
||||
import {
|
||||
@@ -357,7 +356,7 @@ import useWorkflowsEEStore from '@/stores/workflows.ee';
|
||||
import { useUsersStore } from '@/stores/users';
|
||||
import { createEventBus } from '@/event-bus';
|
||||
|
||||
export default mixins(externalHooks, genericHelpers, restApi, showMessage).extend({
|
||||
export default mixins(externalHooks, genericHelpers, showMessage).extend({
|
||||
name: 'WorkflowSettings',
|
||||
components: {
|
||||
Modal,
|
||||
@@ -703,7 +702,7 @@ export default mixins(externalHooks, genericHelpers, restApi, showMessage).exten
|
||||
return;
|
||||
}
|
||||
|
||||
const timezones = await this.restApi().getTimezones();
|
||||
const timezones = await this.settingsStore.getTimezones();
|
||||
|
||||
let defaultTimezoneValue = timezones[this.defaultValues.timezone] as string | undefined;
|
||||
if (defaultTimezoneValue === undefined) {
|
||||
@@ -724,7 +723,7 @@ export default mixins(externalHooks, genericHelpers, restApi, showMessage).exten
|
||||
}
|
||||
},
|
||||
async loadWorkflows() {
|
||||
const workflows = await this.restApi().getWorkflows();
|
||||
const workflows = await this.workflowsStore.fetchAllWorkflows();
|
||||
workflows.sort((a, b) => {
|
||||
if (a.name.toLowerCase() < b.name.toLowerCase()) {
|
||||
return -1;
|
||||
@@ -789,7 +788,7 @@ export default mixins(externalHooks, genericHelpers, restApi, showMessage).exten
|
||||
data.versionId = this.workflowsStore.workflowVersionId;
|
||||
|
||||
try {
|
||||
const workflow = await this.restApi().updateWorkflow(this.$route.params.name, data);
|
||||
const workflow = await this.workflowsStore.updateWorkflow(this.$route.params.name, data);
|
||||
this.workflowsStore.setWorkflowVersionId(workflow.versionId);
|
||||
} catch (error) {
|
||||
this.$showError(
|
||||
|
||||
Reference in New Issue
Block a user