u
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user