mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 22:43:34 -07:00
fix create cookbook
This commit is contained in:
parent
8e7d76651a
commit
f5dd277780
1 changed files with 4 additions and 2 deletions
|
@ -142,7 +142,7 @@ import { VueDraggable } from "vue-draggable-plus";
|
|||
import { useCookbookStore } from "~/composables/store/use-cookbook-store";
|
||||
import { useHouseholdSelf } from "@/composables/use-households";
|
||||
import CookbookEditor from "~/components/Domain/Cookbook/CookbookEditor.vue";
|
||||
import type { ReadCookBook } from "~/lib/api/types/cookbook";
|
||||
import type { CreateCookBook, ReadCookBook } from "~/lib/api/types/cookbook";
|
||||
import { useCookbookPreferences } from "~/composables/use-users/preferences";
|
||||
|
||||
export default defineNuxtComponent({
|
||||
|
@ -188,7 +188,9 @@ export default defineNuxtComponent({
|
|||
household.value?.name || "",
|
||||
String((myCookbooks.value?.length ?? 0) + 1),
|
||||
]) as string;
|
||||
await actions.createOne(name).then((cookbook) => {
|
||||
|
||||
const data = { name } as CreateCookBook;
|
||||
await actions.createOne(data).then((cookbook) => {
|
||||
if (!cookbook) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue