25 lines
501 B
TypeScript
25 lines
501 B
TypeScript
import axios from "axios";
|
|
import { CookieValueTypes } from "cookies-next";
|
|
|
|
axios.defaults.baseURL = "https://sootzaniapi.shetabdahi.ir/";
|
|
|
|
export async function loginStaff({
|
|
token,
|
|
Data,
|
|
}: {
|
|
token: CookieValueTypes;
|
|
Data: {
|
|
userName: string;
|
|
password: string;
|
|
captcha: {
|
|
key: string;
|
|
value: string;
|
|
};
|
|
};
|
|
}) {
|
|
const data = await axios.post("api/Authenticate/LoginStaff", Data, {
|
|
headers: { Authorization: `Bearer ${token}` },
|
|
});
|
|
return data.data;
|
|
}
|