Commit 0a98de1f authored by Phil Hughes's avatar Phil Hughes

Merge branch '216731-fix-fetching-author-under-relativeurl' into 'master'

Fix #216731 "Fetching author API under relative url"

Closes #216731

See merge request gitlab-org/gitlab!32379
parents a47c2860 948ef322
......@@ -3,6 +3,7 @@ import * as types from './mutation_types';
import axios from '~/lib/utils/axios_utils';
import createFlash from '~/flash';
import { __ } from '~/locale';
import { joinPaths } from '~/lib/utils/url_utility';
export default {
setInitialData({ commit }, data) {
......@@ -16,10 +17,8 @@ export default {
},
fetchAuthors({ dispatch, state }, author = null) {
const { projectId } = state;
const path = '/autocomplete/users.json';
return axios
.get(path, {
.get(joinPaths(gon.relative_url_root || '', '/autocomplete/users.json'), {
params: {
project_id: projectId,
active: true,
......
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