fix: delete current user in deleteUser mutation
This commit is contained in:
@@ -27,13 +27,7 @@ export default function DeleteAccountDialog(props: TDeleteAccountDialogProps) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const handleConfirm = React.useCallback(async () => {
|
||||
await deleteUser({
|
||||
variables: {
|
||||
input: {
|
||||
id: currentUser.id,
|
||||
}
|
||||
}
|
||||
});
|
||||
await deleteUser();
|
||||
|
||||
authentication.updateToken('');
|
||||
await apolloClient.clearStore();
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { gql } from '@apollo/client';
|
||||
|
||||
export const DELETE_USER = gql`
|
||||
mutation DeleteUser($input: DeleteUserInput) {
|
||||
deleteUser(input: $input)
|
||||
mutation DeleteUser {
|
||||
deleteUser
|
||||
}
|
||||
`;
|
||||
|
Reference in New Issue
Block a user