2020-05-29 18:08:26 +00:00
|
|
|
import axios from '~/lib/utils/axios_utils';
|
2021-09-15 12:11:13 +00:00
|
|
|
import { joinPaths } from '~/lib/utils/url_utility';
|
2020-05-29 18:08:26 +00:00
|
|
|
|
2021-09-15 12:11:13 +00:00
|
|
|
export const baseUrl = (projectPath) =>
|
|
|
|
joinPaths(gon.relative_url_root || '', `/${projectPath}/ide_terminals`);
|
2020-05-29 18:08:26 +00:00
|
|
|
|
|
|
|
export const checkConfig = (projectPath, branch) =>
|
|
|
|
axios.post(`${baseUrl(projectPath)}/check_config`, {
|
|
|
|
branch,
|
|
|
|
format: 'json',
|
|
|
|
});
|
|
|
|
|
|
|
|
export const create = (projectPath, branch) =>
|
|
|
|
axios.post(baseUrl(projectPath), {
|
|
|
|
branch,
|
|
|
|
format: 'json',
|
|
|
|
});
|