Also pass budgetId
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing

This commit is contained in:
2022-09-11 21:13:46 +00:00
parent 2b15231ed1
commit 49cf6a65da

View File

@ -1,5 +1,6 @@
import { defineStore } from "pinia"; import { defineStore } from "pinia";
import { GET, POST } from "../api"; import { GET, POST } from "../api";
import { useBudgetsStore } from "./budget";
import { useAccountStore } from "./budget-account"; import { useAccountStore } from "./budget-account";
import { Budget, useSessionStore } from "./session"; import { Budget, useSessionStore } from "./session";
@ -30,8 +31,9 @@ export const useCategoryStore = defineStore("category", {
const result = await POST( const result = await POST(
"/category/new", "/category/new",
JSON.stringify({ JSON.stringify({
name: name, budgetId: useBudgetsStore().CurrentBudgetID,
group: group, name: name,
group: group,
}) })
); );
const response = await result.json(); const response = await result.json();