Do not use a store for API
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from "vue"
|
||||
import { useAPI } from "../stores/api";
|
||||
import { DELETE, POST } from "../api";
|
||||
import { useBudgetsStore } from "../stores/budget";
|
||||
import { useSessionStore } from "../stores/session";
|
||||
|
||||
@ -35,8 +35,7 @@ export default defineComponent({
|
||||
if (currentBudgetID == null)
|
||||
return;
|
||||
|
||||
const api = useAPI();
|
||||
api.DELETE("/budget/" + currentBudgetID);
|
||||
DELETE("/budget/" + currentBudgetID);
|
||||
|
||||
const budgetStore = useSessionStore();
|
||||
budgetStore.Budgets.delete(currentBudgetID);
|
||||
@ -44,8 +43,7 @@ export default defineComponent({
|
||||
},
|
||||
clearBudget() {
|
||||
const currentBudgetID = useBudgetsStore().CurrentBudgetID;
|
||||
const api = useAPI();
|
||||
api.POST("/budget/" + currentBudgetID + "/settings/clear", null)
|
||||
POST("/budget/" + currentBudgetID + "/settings/clear", null)
|
||||
},
|
||||
cleanNegative() {
|
||||
// <a href="/budget/{{.Budget.ID}}/settings/clean-negative">Fix all historic negative category-balances</a>
|
||||
|
Reference in New Issue
Block a user