debian-mirror-gitlab/app/assets/javascripts/api/environments_api.js
2023-04-23 21:23:45 +05:30

15 lines
495 B
JavaScript

import axios from '../lib/utils/axios_utils';
import { buildApiUrl } from './api_utils';
export const STOP_STALE_ENVIRONMENTS_PATH = '/api/:version/projects/:id/environments/stop_stale';
export function stopStaleEnvironments(projectId, before, query, options) {
const url = buildApiUrl(STOP_STALE_ENVIRONMENTS_PATH).replace(':id', projectId);
const defaults = {
before: before.toISOString(),
};
return axios.post(url, null, {
params: Object.assign(defaults, options),
});
}