✅ fixed eslint
This commit is contained in:
parent
bfc7ef1eec
commit
8b687e07d7
4 changed files with 7 additions and 7 deletions
|
@ -94,7 +94,7 @@ export const setFileMrChange = ({ commit }, { file, mrChange }) => {
|
|||
commit(types.SET_FILE_MERGE_REQUEST_CHANGE, { file, mrChange });
|
||||
};
|
||||
|
||||
export const getRawFileData = ({ state, commit }, { path, baseSha }) => {
|
||||
export const getRawFileData = ({ state, commit, dispatch }, { path, baseSha }) => {
|
||||
const file = state.entries[path];
|
||||
return new Promise((resolve, reject) => {
|
||||
service
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import { __ } from '../../../locale';
|
||||
import service from '../../services';
|
||||
import * as types from '../mutation_types';
|
||||
|
||||
export const getMergeRequestData = (
|
||||
{ commit, state },
|
||||
{ commit, dispatch, state },
|
||||
{ projectId, mergeRequestId, force = false } = {},
|
||||
) =>
|
||||
new Promise((resolve, reject) => {
|
||||
|
@ -37,7 +38,7 @@ export const getMergeRequestData = (
|
|||
});
|
||||
|
||||
export const getMergeRequestChanges = (
|
||||
{ commit, state },
|
||||
{ commit, dispatch, state },
|
||||
{ projectId, mergeRequestId, force = false } = {},
|
||||
) =>
|
||||
new Promise((resolve, reject) => {
|
||||
|
@ -71,7 +72,7 @@ export const getMergeRequestChanges = (
|
|||
});
|
||||
|
||||
export const getMergeRequestVersions = (
|
||||
{ commit, state },
|
||||
{ commit, dispatch, state },
|
||||
{ projectId, mergeRequestId, force = false } = {},
|
||||
) =>
|
||||
new Promise((resolve, reject) => {
|
||||
|
|
|
@ -80,9 +80,9 @@ export const getFiles = ({ state, commit, dispatch }, { projectId, branchId } =
|
|||
dispatch('setErrorMessage', {
|
||||
text: __('An error occured whilst loading all the files.'),
|
||||
action: payload =>
|
||||
dispatch('getRawFileData', payload).then(() => dispatch('setErrorMessage', null)),
|
||||
dispatch('getFiles', payload).then(() => dispatch('setErrorMessage', null)),
|
||||
actionText: __('Please try again'),
|
||||
actionPayload: { path, baseSha },
|
||||
actionPayload: { projectId, branchId },
|
||||
});
|
||||
}
|
||||
reject(e);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import MockAdapter from 'axios-mock-adapter';
|
||||
import Vue from 'vue';
|
||||
import testAction from 'spec/helpers/vuex_action_helper';
|
||||
import { showTreeEntry, getFiles } from '~/ide/stores/actions/tree';
|
||||
import * as types from '~/ide/stores/mutation_types';
|
||||
|
|
Loading…
Reference in a new issue