fix: rewire profit from api
This commit is contained in:
1 parent
62c0e1aab2
commit
206e6b3fa4
2 files changed
+5
-3
No files matched your search
@@ -12,6 +12,7 @@ import {
|
||||
LocationApi,
|
||||
MarketApi,
|
||||
MeResponse,
|
||||
ProfitApi,
|
||||
ReprocessingApi,
|
||||
RuleBookApi,
|
||||
RuleScriptApi,
|
||||
@@ -108,6 +109,7 @@ export const postLogout = (): Promise<void> =>
|
||||
|
||||
export const ledgerApi = new LedgerApi(undefined, mammonUrl, mammonAxiosInstance);
|
||||
export const transactionApi = new TransactionApi(undefined, mammonUrl, mammonAxiosInstance);
|
||||
export const profitApi = new ProfitApi(undefined, mammonUrl, mammonAxiosInstance);
|
||||
export const characterApi = new CharacterApi(undefined, mammonUrl, mammonAxiosInstance);
|
||||
export const corporationApi = new CorporationApi(undefined, mammonUrl, mammonAxiosInstance);
|
||||
export const ruleBookApi = new RuleBookApi(undefined, mammonUrl, mammonAxiosInstance);
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
} from "chart.js";
|
||||
import {Chart} from "vue-chartjs";
|
||||
import {useLedgerParam} from "@/ledger";
|
||||
import {transactionApi} from "@/mammon";
|
||||
import {profitApi} from "@/mammon";
|
||||
import {useProcessedResource} from "@/activity";
|
||||
import {DailyProfitResponse} from "@/generated/mammon";
|
||||
import {IskLabel} from "@/market";
|
||||
@@ -48,8 +48,8 @@ const profits = useProcessedResource<DailyProfitResponse[]>(async () => {
|
||||
}
|
||||
|
||||
const {data} = mode.value === ProfitModes.Margin
|
||||
? await transactionApi.marginPerDayInLedger(ledgerId.value)
|
||||
: await transactionApi.profitPerDayInLedger(ledgerId.value);
|
||||
? await profitApi.marginPerDayInLedger(ledgerId.value)
|
||||
: await profitApi.profitPerDayInLedger(ledgerId.value);
|
||||
|
||||
return data;
|
||||
}, []);
|
||||
|
||||
Reference in new issue
Block a user