mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 18:23:50 +00:00
pinia: Update error handling
This commit is contained in:
parent
18e56258e9
commit
b272c73e89
|
@ -1,3 +1,4 @@
|
|||
import { useBotStore } from '@/stores/ftbotwrapper';
|
||||
import axios from 'axios';
|
||||
import { UserService } from './userService';
|
||||
|
||||
|
@ -55,8 +56,8 @@ export function useApi(userService: UserService, botId: string) {
|
|||
}
|
||||
if ((err.response && err.response.status === 500) || err.message === 'Network Error') {
|
||||
console.log('Bot not running...');
|
||||
//TODO: pinia alternative
|
||||
// globalStore.dispatch(`ftbot/${botId}/setIsBotOnline`, false);
|
||||
const botStore = useBotStore();
|
||||
botStore.botStores[botId]?.setIsBotOnline(false);
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user