Commit 8b687e07 authored by Phil Hughes's avatar Phil Hughes

fixed eslint

parent bfc7ef1e
...@@ -94,7 +94,7 @@ export const setFileMrChange = ({ commit }, { file, mrChange }) => { ...@@ -94,7 +94,7 @@ export const setFileMrChange = ({ commit }, { file, mrChange }) => {
commit(types.SET_FILE_MERGE_REQUEST_CHANGE, { 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]; const file = state.entries[path];
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
service service
......
import { __ } from '../../../locale';
import service from '../../services'; import service from '../../services';
import * as types from '../mutation_types'; import * as types from '../mutation_types';
export const getMergeRequestData = ( export const getMergeRequestData = (
{ commit, state }, { commit, dispatch, state },
{ projectId, mergeRequestId, force = false } = {}, { projectId, mergeRequestId, force = false } = {},
) => ) =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
...@@ -37,7 +38,7 @@ export const getMergeRequestData = ( ...@@ -37,7 +38,7 @@ export const getMergeRequestData = (
}); });
export const getMergeRequestChanges = ( export const getMergeRequestChanges = (
{ commit, state }, { commit, dispatch, state },
{ projectId, mergeRequestId, force = false } = {}, { projectId, mergeRequestId, force = false } = {},
) => ) =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
...@@ -71,7 +72,7 @@ export const getMergeRequestChanges = ( ...@@ -71,7 +72,7 @@ export const getMergeRequestChanges = (
}); });
export const getMergeRequestVersions = ( export const getMergeRequestVersions = (
{ commit, state }, { commit, dispatch, state },
{ projectId, mergeRequestId, force = false } = {}, { projectId, mergeRequestId, force = false } = {},
) => ) =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
......
...@@ -80,9 +80,9 @@ export const getFiles = ({ state, commit, dispatch }, { projectId, branchId } = ...@@ -80,9 +80,9 @@ export const getFiles = ({ state, commit, dispatch }, { projectId, branchId } =
dispatch('setErrorMessage', { dispatch('setErrorMessage', {
text: __('An error occured whilst loading all the files.'), text: __('An error occured whilst loading all the files.'),
action: payload => action: payload =>
dispatch('getRawFileData', payload).then(() => dispatch('setErrorMessage', null)), dispatch('getFiles', payload).then(() => dispatch('setErrorMessage', null)),
actionText: __('Please try again'), actionText: __('Please try again'),
actionPayload: { path, baseSha }, actionPayload: { projectId, branchId },
}); });
} }
reject(e); reject(e);
......
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import Vue from 'vue';
import testAction from 'spec/helpers/vuex_action_helper'; import testAction from 'spec/helpers/vuex_action_helper';
import { showTreeEntry, getFiles } from '~/ide/stores/actions/tree'; import { showTreeEntry, getFiles } from '~/ide/stores/actions/tree';
import * as types from '~/ide/stores/mutation_types'; import * as types from '~/ide/stores/mutation_types';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment