mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 19:16:22 +00:00
fix(ui): sending group users without orgid
This commit is contained in:
@@ -3,8 +3,8 @@ import { useQuery } from "@tanstack/react-query";
|
||||
import { apiRequest } from "@app/config/request";
|
||||
|
||||
export const groupKeys = {
|
||||
getGroupUserMembership: (slug: string) => [{ slug }, "group-user-memberships"] as const
|
||||
}
|
||||
getGroupUserMembership: (slug: string) => [{ slug }, "group-user-memberships"] as const
|
||||
};
|
||||
|
||||
type TUser = {
|
||||
id: string;
|
||||
@@ -13,17 +13,16 @@ type TUser = {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
isPartOfGroup: boolean;
|
||||
}
|
||||
};
|
||||
|
||||
export const useListGroupUsers = (groupSlug: string) => {
|
||||
return useQuery({
|
||||
queryKey: groupKeys.getGroupUserMembership(groupSlug),
|
||||
enabled: Boolean(groupSlug),
|
||||
queryFn: async () => {
|
||||
const {
|
||||
data: users
|
||||
} = await apiRequest.get<TUser[]>(`/api/v1/groups/${groupSlug}/users`);
|
||||
|
||||
const { data: users } = await apiRequest.get<TUser[]>(`/api/v1/groups/${groupSlug}/users`);
|
||||
|
||||
return users;
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user