cleanup tests
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useAuthStore } from "@/auth";
|
||||
import { marbasAxiosInstance } from "@/service";
|
||||
import { defineStore } from "pinia";
|
||||
import { computed, onMounted, ref } from "vue";
|
||||
import { computed, ref } from "vue";
|
||||
|
||||
export type AcquiredMarketItem = {
|
||||
id: number;
|
||||
@@ -60,9 +60,7 @@ export const useAcquiredItemStore = defineStore('market-acquisition', () => {
|
||||
await marbasAxiosInstance.put(`${endpoint}/${item.id}`, item);
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
acquiredItems.value = (await marbasAxiosInstance.get<AcquiredMarketItem[]>(endpoint)).data.filter(item => item.remaining > 0);
|
||||
});
|
||||
marbasAxiosInstance.get<AcquiredMarketItem[]>(endpoint).then(res => acquiredItems.value = res.data.filter(item => item.remaining > 0));
|
||||
|
||||
return { items, addAcquiredItem, removeAcquiredItem };
|
||||
});
|
||||
@@ -8,7 +8,10 @@ export const logResource = (a: AxiosInstance) => {
|
||||
log.debug(`[${r.config.method?.toUpperCase()}] ${r.config.url}`);
|
||||
return r;
|
||||
}, e => {
|
||||
log.error(`[${e.config.method?.toUpperCase()}] ${e.config.url} failed with ${e.response?.status} ${e.response?.statusText}`);
|
||||
if (e instanceof Error) {
|
||||
log.error(e.message);
|
||||
}
|
||||
log.error(`[${e.config?.method?.toUpperCase()}] ${e.config?.url} failed with ${e.response?.status} ${e.response?.statusText}`);
|
||||
return Promise.reject(e);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user