Commit 4ca5b238 authored by Jacob Schatz's avatar Jacob Schatz

Merge branch 'axios-path-locks' into 'master'

Replace $.post with axios in initPathLocks

See merge request gitlab-org/gitlab-ee!4516
parents e842e682 6ab1456e
import flash from '~/flash';
import { __ } from '~/locale';
import axios from '~/lib/utils/axios_utils';
export default function initPathLocks(url, path) { export default function initPathLocks(url, path) {
$('a.path-lock').on('click', (e) => { $('a.path-lock').on('click', (e) => {
e.preventDefault(); e.preventDefault();
$.post(url, { axios.post(url, {
path, path,
}, () => { }).then(() => {
location.reload(); location.reload();
}); }).catch(() => flash(__('An error occurred while initializing path locks')));
}); });
} }
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