mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +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
@@ -56,7 +56,6 @@ import { workflowHelpers } from '@/mixins/workflowHelpers';
|
||||
import { showMessage } from '@/mixins/showMessage';
|
||||
import TagsDropdown from '@/components/TagsDropdown.vue';
|
||||
import Modal from './Modal.vue';
|
||||
import { restApi } from '@/mixins/restApi';
|
||||
import { mapStores } from 'pinia';
|
||||
import { useSettingsStore } from '@/stores/settings';
|
||||
import { useWorkflowsStore } from '@/stores/workflows';
|
||||
@@ -64,8 +63,9 @@ import { IWorkflowDataUpdate } from '@/Interface';
|
||||
import { getWorkflowPermissions, IPermissions } from '@/permissions';
|
||||
import { useUsersStore } from '@/stores/users';
|
||||
import { createEventBus } from '@/event-bus';
|
||||
import { useCredentialsStore } from '@/stores';
|
||||
|
||||
export default mixins(showMessage, workflowHelpers, restApi).extend({
|
||||
export default mixins(showMessage, workflowHelpers).extend({
|
||||
components: { TagsDropdown, Modal },
|
||||
name: 'DuplicateWorkflow',
|
||||
props: ['modalName', 'isActive', 'data'],
|
||||
@@ -87,7 +87,7 @@ export default mixins(showMessage, workflowHelpers, restApi).extend({
|
||||
this.$nextTick(() => this.focusOnNameInput());
|
||||
},
|
||||
computed: {
|
||||
...mapStores(useUsersStore, useSettingsStore, useWorkflowsStore),
|
||||
...mapStores(useCredentialsStore, useUsersStore, useSettingsStore, useWorkflowsStore),
|
||||
workflowPermissions(): IPermissions {
|
||||
const isEmptyWorkflow = this.data.id === PLACEHOLDER_EMPTY_WORKFLOW_ID;
|
||||
const isCurrentWorkflowEmpty =
|
||||
@@ -150,7 +150,7 @@ export default mixins(showMessage, workflowHelpers, restApi).extend({
|
||||
let workflowToUpdate: IWorkflowDataUpdate | undefined;
|
||||
if (currentWorkflowId !== PLACEHOLDER_EMPTY_WORKFLOW_ID) {
|
||||
const { createdAt, updatedAt, usedCredentials, ...workflow } =
|
||||
await this.restApi().getWorkflow(this.data.id);
|
||||
await this.workflowsStore.fetchWorkflow(this.data.id);
|
||||
workflowToUpdate = workflow;
|
||||
|
||||
this.removeForeignCredentialsFromWorkflow(
|
||||
|
||||
Reference in New Issue
Block a user