aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/api/user_groups.ts
diff options
context:
space:
mode:
authorViktor Vorona <viktor.vorona@sonarsource.com>2023-11-27 11:09:07 +0100
committersonartech <sonartech@sonarsource.com>2023-11-28 20:02:43 +0000
commit34d70b67a50d90c9b8380898fe645aac19c9c5db (patch)
treeb73958a2ff453f39c0c343221b11bf0753006734 /server/sonar-web/src/main/js/api/user_groups.ts
parent683569ab1f206005514ea88e65ff343be61b838d (diff)
downloadsonarqube-34d70b67a50d90c9b8380898fe645aac19c9c5db.tar.gz
sonarqube-34d70b67a50d90c9b8380898fe645aac19c9c5db.zip
SONAR-21073 Use new /group-memberships endpoints on UI
Diffstat (limited to 'server/sonar-web/src/main/js/api/user_groups.ts')
-rw-r--r--server/sonar-web/src/main/js/api/user_groups.ts26
1 files changed, 2 insertions, 24 deletions
diff --git a/server/sonar-web/src/main/js/api/user_groups.ts b/server/sonar-web/src/main/js/api/user_groups.ts
index ade6218916c..fbb2fb33941 100644
--- a/server/sonar-web/src/main/js/api/user_groups.ts
+++ b/server/sonar-web/src/main/js/api/user_groups.ts
@@ -18,9 +18,8 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import axios from 'axios';
-import { throwGlobalError } from '../helpers/error';
-import { axiosToCatch, getJSON, post } from '../helpers/request';
-import { Group, Paging, UserGroupMember } from '../types/types';
+import { axiosToCatch } from '../helpers/request';
+import { Group, Paging } from '../types/types';
const GROUPS_ENDPOINT = '/api/v2/authorizations/groups';
@@ -33,27 +32,6 @@ export function getUsersGroups(params: {
return axios.get(GROUPS_ENDPOINT, { params });
}
-export function getUsersInGroup(data: {
- name?: string;
- p?: number;
- ps?: number;
- q?: string;
- selected?: string;
-}): Promise<{
- paging: Paging;
- users: UserGroupMember[];
-}> {
- return getJSON('/api/user_groups/users', data).catch(throwGlobalError);
-}
-
-export function addUserToGroup(data: { name: string; login?: string }) {
- return post('/api/user_groups/add_user', data).catch(throwGlobalError);
-}
-
-export function removeUserFromGroup(data: { name: string; login?: string }) {
- return post('/api/user_groups/remove_user', data).catch(throwGlobalError);
-}
-
export function createGroup(data: { description?: string; name: string }): Promise<Group> {
return axios.post(GROUPS_ENDPOINT, data).then((r) => r.group);
}