Welcome to mirror list, hosted at ThFree Co, Russian Federation.

environments_api.js « api « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9912b1ab696333ecca64506e66971e7376bded6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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),
  });
}