Fix daily payload

This commit is contained in:
Matthias 2020-08-17 07:05:51 +02:00
parent 08f6ae7096
commit 7985a283fb
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
import { api } from '@/shared/apiService'; import { api } from '@/shared/apiService';
import { BotState, BlacklistPayload, ForcebuyPayload, Logs } from '@/store/types'; import { BotState, BlacklistPayload, ForcebuyPayload, Logs, DailyPayload } from '@/store/types';
export default { export default {
namespaced: true, namespaced: true,
@ -123,7 +123,7 @@ export default {
.then((result) => commit('updateBalance', result.data)) .then((result) => commit('updateBalance', result.data))
.catch(console.error); .catch(console.error);
}, },
getDaily({ commit }, payload = {}) { getDaily({ commit }, payload: DailyPayload) {
const { timescale = 20 } = payload; const { timescale = 20 } = payload;
return api return api
.get('/daily', { params: { timescale } }) .get('/daily', { params: { timescale } })

View File

@ -8,8 +8,8 @@ export interface BlacklistPayload {
blacklist: Array<string>; blacklist: Array<string>;
} }
export interface DailyInterface { export interface DailyPayload {
timescale: number; timescale?: number;
} }
export interface ForcebuyPayload { export interface ForcebuyPayload {