2023-07-11 12:26:38 +07:00
|
|
|
import axios from "axios";
|
2022-06-25 21:38:09 +07:00
|
|
|
|
2022-07-09 21:17:08 +07:00
|
|
|
const getTokenFree = async (baseUrl: string, data: any = {}) => {
|
2022-06-26 14:28:37 +07:00
|
|
|
const url = `${baseUrl}/__free__/api/get_token`;
|
2022-06-25 21:38:09 +07:00
|
|
|
return axios({
|
|
|
|
method: "POST",
|
|
|
|
url: url,
|
|
|
|
data: {
|
|
|
|
...data,
|
|
|
|
},
|
|
|
|
headers: {
|
|
|
|
"x-access-type": "FREE",
|
2022-11-30 12:17:30 +07:00
|
|
|
"Accept-Encoding": "identity",
|
2022-06-25 21:38:09 +07:00
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2022-07-09 21:17:08 +07:00
|
|
|
export {
|
2022-06-25 21:38:09 +07:00
|
|
|
getTokenFree,
|
|
|
|
};
|