23 lines
576 B
TypeScript
23 lines
576 B
TypeScript
import axios from "axios";
|
|
import { CookieValueTypes } from "cookies-next";
|
|
const instance = { id: 1 };
|
|
|
|
axios.defaults.baseURL = process.env.NEXT_PUBLIC_BASE_URL_APP;
|
|
// axios.defaults.baseURL = "https://shahrbinapi.shetabdahi.ir/";
|
|
|
|
// Get Captcha
|
|
export async function getCaptcha() {
|
|
const data = await axios.get(`/api/Authenticate/Captcha`, {
|
|
responseType: "blob",
|
|
});
|
|
return data;
|
|
}
|
|
|
|
export async function resendOtp(payload: { otpToken: string | any}) {
|
|
const data = await axios.post(
|
|
`/api/Authenticate/ResendOtp`,
|
|
payload
|
|
);
|
|
return data.data;
|
|
}
|