diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-20 23:50:22 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-20 23:50:22 +0000 |
commit | 9dc93a4519d9d5d7be48ff274127136236a3adb3 (patch) | |
tree | 70467ae3692a0e35e5ea56bcb803eb512a10bedb /app/assets/javascripts/jira_connect/api.js | |
parent | 4b0f34b6d759d6299322b3a54453e930c6121ff0 (diff) | |
download | gitlab-ce-13.11.0-rc43.tar.gz |
Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43
Diffstat (limited to 'app/assets/javascripts/jira_connect/api.js')
-rw-r--r-- | app/assets/javascripts/jira_connect/api.js | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/app/assets/javascripts/jira_connect/api.js b/app/assets/javascripts/jira_connect/api.js index d78aba0a3f7..abf2c070e68 100644 --- a/app/assets/javascripts/jira_connect/api.js +++ b/app/assets/javascripts/jira_connect/api.js @@ -1,24 +1,5 @@ import axios from 'axios'; - -export const getJwt = () => { - return new Promise((resolve) => { - AP.context.getToken((token) => { - resolve(token); - }); - }); -}; - -export const getLocation = () => { - return new Promise((resolve) => { - if (typeof AP.getLocation !== 'function') { - resolve(); - } - - AP.getLocation((location) => { - resolve(location); - }); - }); -}; +import { getJwt } from '~/jira_connect/utils'; export const addSubscription = async (addPath, namespace) => { const jwt = await getJwt(); @@ -39,11 +20,12 @@ export const removeSubscription = async (removePath) => { }); }; -export const fetchGroups = async (groupsPath, { page, perPage }) => { +export const fetchGroups = async (groupsPath, { page, perPage, search }) => { return axios.get(groupsPath, { params: { page, per_page: perPage, + search, }, }); }; |