diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-14 21:08:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-14 21:08:53 +0300 |
commit | 5b62f8e3ee531f63ce3c49cae03e2a618ba51615 (patch) | |
tree | 2d2553232fe0663957ee4d1054211cc71cb07679 /app/assets/javascripts/api | |
parent | cdb41961fd2bc233d36c5b30f89d087c2efa9818 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/api')
-rw-r--r-- | app/assets/javascripts/api/user_api.js | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/app/assets/javascripts/api/user_api.js b/app/assets/javascripts/api/user_api.js index bcb0f079d3d..3ebb07807d2 100644 --- a/app/assets/javascripts/api/user_api.js +++ b/app/assets/javascripts/api/user_api.js @@ -1,6 +1,4 @@ import { DEFAULT_PER_PAGE } from '~/api'; -import { createAlert } from '~/alert'; -import { __ } from '~/locale'; import axios from '../lib/utils/axios_utils'; import { buildApiUrl } from './api_utils'; @@ -44,22 +42,12 @@ export function getUserStatus(id, options) { }); } -export function getUserProjects(userId, query, options, callback) { +export function getUserProjects(userId, options) { const url = buildApiUrl(USER_PROJECTS_PATH).replace(':id', userId); - const defaults = { - search: query, - per_page: DEFAULT_PER_PAGE, - }; - return axios - .get(url, { - params: { ...defaults, ...options }, - }) - .then(({ data }) => callback(data)) - .catch(() => - createAlert({ - message: __('Something went wrong while fetching projects'), - }), - ); + + return axios.get(url, { + params: options, + }); } export function updateUserStatus({ emoji, message, availability, clearStatusAfter }) { |