mirror of
https://github.com/urosran/cally.git
synced 2026-10-25 04:57:55 +00:00
LOgging in with qr code added
This commit is contained in:
@@ -12,8 +12,9 @@ export const useCreateSubUser = () => {
|
||||
mutationFn: async ({email, ...userProfile}: { email: string } & UserProfile) => {
|
||||
if (profileType === ProfileType.PARENT) {
|
||||
return await functions().httpsCallable("createSubUser")({
|
||||
...userProfile,
|
||||
email,
|
||||
userProfile: {...userProfile, familyId: profileData?.familyId}
|
||||
familyId: profileData?.familyId
|
||||
})
|
||||
} else {
|
||||
throw Error("Can't create sub-users as a non-parent.")
|
||||
@@ -21,6 +22,7 @@ export const useCreateSubUser = () => {
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({queryKey: ["getChildrenByParentId"]})
|
||||
queryClient.invalidateQueries({queryKey: ["familyMembers"]})
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user