Commit 6ab1456e authored by Clement Ho's avatar Clement Ho

Replace $.post with axios in initPathLocks

parent 1d237d4b
import flash from '~/flash';
import { __ } from '~/locale';
import axios from '~/lib/utils/axios_utils';
export default function initPathLocks(url, path) {
$('a.path-lock').on('click', (e) => {
e.preventDefault();
$.post(url, {
axios.post(url, {
path,
}, () => {
}).then(() => {
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