debian-mirror-gitlab/app/assets/javascripts/api/integrations_api.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
568 B
JavaScript
Raw Normal View History

2022-07-16 23:28:13 +05:30
import axios from '../lib/utils/axios_utils';
import { buildApiUrl } from './api_utils';
const JIRA_CONNECT_SUBSCRIPTIONS_PATH = '/api/:version/integrations/jira_connect/subscriptions';
export function addJiraConnectSubscription(namespacePath, { jwt, accessToken }) {
const url = buildApiUrl(JIRA_CONNECT_SUBSCRIPTIONS_PATH);
return axios.post(
url,
{
jwt,
namespace_path: namespacePath,
},
{
headers: {
Authorization: `Bearer ${accessToken}`, // eslint-disable-line @gitlab/require-i18n-strings
},
},
);
}