proxy through ngnix
This commit is contained in:
@@ -18,7 +18,7 @@ const addOrRelaod = async (type: MarketType) => {
|
||||
const typeID = type.id;
|
||||
const [history, price] = await Promise.all([
|
||||
getHistory(jitaId, typeID),
|
||||
evepraisalAxiosInstance.post('/appraisal.json?market=jita&persist=no', type.name)
|
||||
evepraisalAxiosInstance.post(`/appraisal.json?market=jita&persist=no&raw_textarea=${type.name}`)
|
||||
]);
|
||||
const item = {
|
||||
type,
|
||||
@@ -45,6 +45,10 @@ const addItem = async () => {
|
||||
|
||||
watch(items, itms => itemsStorage.value = itms.map(i => ({ typeID: i.type.id, history: i.history })));
|
||||
onMounted(async () => {
|
||||
if (itemsStorage.value.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const types = await getMarketTypes(itemsStorage.value.map(i => i.typeID));
|
||||
const prices: any = (await evepraisalAxiosInstance.post(`/appraisal.json?market=jita&persist=no&raw_textarea=${types.map(t => t.name).join("%0A")}`)).data;
|
||||
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
import axios from 'axios';
|
||||
|
||||
const evealApiUrl = process.env.EVEAL_API_URL;
|
||||
const evepraisalUrl = process.env.EVEPRAISAL_URL;
|
||||
const esiUrl = process.env.ESI_URL;
|
||||
|
||||
export const apiAxiosInstance = axios.create({
|
||||
baseURL: evealApiUrl,
|
||||
baseURL: '/api/',
|
||||
headers: {
|
||||
'accept': 'application/json',
|
||||
"Content-Type": "application/json"
|
||||
@@ -13,7 +9,7 @@ export const apiAxiosInstance = axios.create({
|
||||
})
|
||||
|
||||
export const evepraisalAxiosInstance = axios.create({
|
||||
baseURL: evepraisalUrl,
|
||||
baseURL: '/appraisal/',
|
||||
headers: {
|
||||
'accept': 'application/json',
|
||||
"Content-Type": "application/json"
|
||||
@@ -21,10 +17,9 @@ export const evepraisalAxiosInstance = axios.create({
|
||||
})
|
||||
|
||||
export const esiAxiosInstance = axios.create({
|
||||
baseURL: esiUrl,
|
||||
baseURL: '/esi/',
|
||||
headers: {
|
||||
'accept': 'application/json',
|
||||
"Content-Type": "application/json",
|
||||
"User-Agent": "eveal (eveal.shendai.rip calloch.gael@gmail.com)"
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user