Перейти к основному содержимому

useUpdateSystemRole

@mineflow/client-react


@mineflow/client-react / useUpdateSystemRole

Function: useUpdateSystemRole()

function useUpdateSystemRole(): UseMutationResult<{
code: string;
createdAt: string;
description: string | null;
id: string;
name: string;
permissions: object[];
scopeByObject: boolean;
updatedAt: string;
version: number;
}, Error, {
body: {
[key: string]: unknown;
};
id: string;
}>;

Defined in: client-react/src/domain-hooks/refs.ts:116

Правка системной роли (PATCH; напр. name/description/permissions/ scopeByObject). На успехе инвалидирует справочник ролей.

Returns

UseMutationResult<{ code: string; createdAt: string; description: string | null; id: string; name: string; permissions: object[]; scopeByObject: boolean; updatedAt: string; version: number; }, Error, { body: { [key: string]: unknown; }; id: string; }>

UseMutationResultmutate({ id, body }).