Feat: Invite multiple users to project with multiple roles

This commit is contained in:
Daniel Hougaard
2024-09-12 11:03:20 +04:00
parent 1581aa088d
commit 93ba29e57f
6 changed files with 252 additions and 48 deletions
+3 -2
View File
@@ -51,9 +51,10 @@ export const useAddUserToWsNonE2EE = () => {
const queryClient = useQueryClient();
return useMutation<{}, {}, AddUserToWsDTONonE2EE>({
mutationFn: async ({ projectId, usernames }) => {
mutationFn: async ({ projectId, usernames, roleSlugs }) => {
const { data } = await apiRequest.post(`/api/v2/workspace/${projectId}/memberships`, {
usernames
usernames,
roleSlugs
});
return data;
},