This commit is contained in:
seb
2026-10-09 10:42:24 +02:00
parent 1933ac794d
commit 38339b13a2
8 changed files with 353 additions and 37 deletions

View File

@@ -208,7 +208,7 @@ const actions = {
* @param {{ parentId: number|string, name: string }} param0
*/
async createArticle({ parentId, name }) {
const res = await articleApi.create({ parentId, name });
const res = await articleApi.create({ categoryId: parentId, name });
const created = res.article;
if (created) appendArticlesToCategoryViews({ categoryId: parentId, articles: [created] });
return created;
@@ -223,7 +223,7 @@ const actions = {
if (list.length === 0) throw new Error('Keine Namen übergeben.');
const created = [];
for (const name of list) {
const res = await articleApi.create({ parentId, name });
const res = await articleApi.create({ categoryId: parentId, name });
if (res.article) created.push(res.article);
}
appendArticlesToCategoryViews({ categoryId: parentId, articles: created });