33 lines
688 B
TypeScript
33 lines
688 B
TypeScript
import axios from "axios";
|
|
import {
|
|
CookieValueTypes,
|
|
deleteCookie,
|
|
getCookie,
|
|
setCookie,
|
|
} from "cookies-next";
|
|
const instance = { id: 1 };
|
|
|
|
axios.defaults.baseURL = process.env.NEXT_PUBLIC_BASE_URL_APP;
|
|
|
|
|
|
export async function logisterCitizen(payload: {
|
|
phoneNumber: string;
|
|
captcha: {
|
|
key: string;
|
|
value: string;
|
|
};
|
|
}) {
|
|
const data = await axios.post(`api/Authenticate/LogisterCitizen`,payload);
|
|
return data.data;
|
|
}
|
|
|
|
|
|
|
|
export async function verifyCitizen(payload: {
|
|
otpToken: string | null;
|
|
verificationCode: string;
|
|
}) {
|
|
const data = await axios.post(`api/Authenticate/VerifyCitizen`, payload);
|
|
return data.data;
|
|
}
|
|
|