Files
maher 703f50a09d
Some checks failed
Build / run (push) Has been cancelled
first commit
2025-10-29 11:42:25 +01:00

24 lines
599 B
TypeScript
Executable File

import {useMutation} from '@tanstack/react-query';
import {apiClient} from '@common/http/query-client';
import {BackendResponse} from '@common/http/backend-response/backend-response';
interface Response extends BackendResponse {
result: 'connected' | null;
}
interface Payload {
host: string;
}
export function useValidateDomainDns() {
return useMutation({
mutationFn: (props: Payload) => authorize(props),
});
}
function authorize(payload: Payload): Promise<Response> {
return apiClient
.post('secure/custom-domain/validate/2BrM45vvfS/api', payload)
.then(r => r.data);
}