Do not use a store for API
This commit is contained in:
@ -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 || [];
|
||||
|
Reference in New Issue
Block a user