Resolve PR review items, moved identity auth logic into separate controller, etc.

This commit is contained in:
Tuan Dang
2023-12-10 14:15:25 +07:00
parent 50ef23e8a0
commit 444ce9508d
15 changed files with 949 additions and 897 deletions
@@ -29,9 +29,8 @@ import {
import { useToggle } from "@app/hooks";
import {
useCreateIdentityUniversalAuthClientSecret,
useDeleteIdentityUniversalAuthClientSecret,
useGetIdentityUniversalAuth,
useGetIdentityUniversalAuthClientSecrets} from "@app/hooks/api";
useGetIdentityUniversalAuthClientSecrets, useRevokeIdentityUniversalAuthClientSecret} from "@app/hooks/api";
import { UsePopUpState } from "@app/hooks/usePopUp";
const schema = yup.object({
@@ -73,7 +72,7 @@ export const IdentityUniversalAuthClientSecretModal = ({
const { data: identityUniversalAuth } = useGetIdentityUniversalAuth(popUpData?.identityId ?? "");
const { mutateAsync: createClientSecretMutateAsync } = useCreateIdentityUniversalAuthClientSecret();
const { mutateAsync: deleteClientSecretMutateAsync } = useDeleteIdentityUniversalAuthClientSecret();
const { mutateAsync: revokeClientSecretMutateAsync } = useRevokeIdentityUniversalAuthClientSecret();
const {
control,
@@ -145,7 +144,7 @@ export const IdentityUniversalAuthClientSecretModal = ({
if (!popUpData?.identityId) return;
await deleteClientSecretMutateAsync({
await revokeClientSecretMutateAsync({
identityId: popUpData.identityId,
clientSecretId
});