diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-23 03:07:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-23 03:07:55 +0300 |
commit | 82f96a9ae2529898de0e91ccfad1d6457f3c1975 (patch) | |
tree | 7e189a0d2cef7df67aaa4f709e3f5bc312878cbd /app/assets/javascripts/api | |
parent | c50e042a392687730db9b8c2607883485b258ae4 (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 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/assets/javascripts/api/user_api.js b/app/assets/javascripts/api/user_api.js index 3ebb07807d2..17ad1a0b31d 100644 --- a/app/assets/javascripts/api/user_api.js +++ b/app/assets/javascripts/api/user_api.js @@ -10,6 +10,7 @@ const USER_PROJECTS_PATH = '/api/:version/users/:id/projects'; const USER_POST_STATUS_PATH = '/api/:version/user/status'; const USER_FOLLOW_PATH = '/api/:version/users/:id/follow'; const USER_UNFOLLOW_PATH = '/api/:version/users/:id/unfollow'; +const USER_FOLLOWERS_PATH = '/api/:version/users/:id/followers'; const USER_ASSOCIATIONS_COUNT_PATH = '/api/:version/users/:id/associations_count'; export function getUsers(query, options) { @@ -71,6 +72,16 @@ export function unfollowUser(userId) { return axios.post(url); } +export function getUserFollowers(userId, params) { + const url = buildApiUrl(USER_FOLLOWERS_PATH).replace(':id', encodeURIComponent(userId)); + return axios.get(url, { + params: { + per_page: DEFAULT_PER_PAGE, + ...params, + }, + }); +} + export function associationsCount(userId) { const url = buildApiUrl(USER_ASSOCIATIONS_COUNT_PATH).replace(':id', encodeURIComponent(userId)); return axios.get(url); |