feat: implemented ui and api for managing user,identity metadata

This commit is contained in:
=
2024-10-02 00:39:43 +05:30
parent 15c98a1d2e
commit 77e191d63e
24 changed files with 570 additions and 92 deletions
@@ -67,12 +67,13 @@ export const useCreateIdentity = () => {
export const useUpdateIdentity = () => {
const queryClient = useQueryClient();
return useMutation<Identity, {}, UpdateIdentityDTO>({
mutationFn: async ({ identityId, name, role }) => {
mutationFn: async ({ identityId, name, role, metadata }) => {
const {
data: { identity }
} = await apiRequest.patch(`/api/v1/identities/${identityId}`, {
name,
role
role,
metadata
});
return identity;