create-categories #79
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user