import axios from "axios";

export const sendEmailVerification = (setIsLoading: (isLoading: boolean) => void, onSuccess: () => void, onError: (e: Error) => void) => {
	setIsLoading(true);
	axios
		.post<{ok: boolean}>("/api/reset/sendVerification", {})
		.then(onSuccess)
		.catch(onError)
		.finally(() => setIsLoading(false));
};
