Team sync: Fix apply query string instead of param (#65433)

* fix: apply query string instead of param

* Update public/app/features/teams/state/actions.ts
This commit is contained in:
Eric Leijonmarck 2023-03-28 14:40:51 +01:00 committed by GitHub
parent 2c978fb0f0
commit c8252f9987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,7 +118,8 @@ export function addTeamGroup(groupId: string): ThunkResult<void> {
export function removeTeamGroup(groupId: string): ThunkResult<void> {
return async (dispatch, getStore) => {
const team = getStore().team.team;
await getBackendSrv().delete(`/api/teams/${team.id}/groups/${encodeURIComponent(groupId)}`);
// need to use query parameter due to escaped characters in the request
await getBackendSrv().delete(`/api/teams/${team.id}/groups?groupId=${encodeURIComponent(groupId)}`);
dispatch(loadTeamGroups());
};
}