Do not use a store for API

This commit is contained in:
2022-02-14 08:11:42 +00:00
parent ca93e9cd55
commit d11c0036b5
8 changed files with 43 additions and 56 deletions

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { defineComponent, PropType } from "vue"
import { useAPI } from "../stores/api";
import { GET } from "../api";
import { useBudgetsStore } from "../stores/budget";
export interface Suggestion {
@ -42,9 +42,8 @@ export default defineComponent({
return;
}
const api = useAPI();
const budgetStore = useBudgetsStore();
api.GET("/budget/" + budgetStore.CurrentBudgetID + "/autocomplete/" + this.type + "?s=" + text)
GET("/budget/" + budgetStore.CurrentBudgetID + "/autocomplete/" + this.type + "?s=" + text)
.then(x=>x.json())
.then(x => {
let suggestions = x || [];