u
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* Everything is created through the existing dashback API:
|
||||
* - categories: POST /api/category ({ parentId, name })
|
||||
* - brands: PUT /api/brand ({ name }) → { brand: { id } }
|
||||
* - articles: POST /api/article ({ parentId, name }) → { article: { sku } }
|
||||
* - articles: POST /api/article ({ categoryId, name }) → { article: { sku } }
|
||||
* - price: PUT /api/article/:sku/prices ({ prices: [{ price, tax }] })
|
||||
* - brand: PUT /api/article/:sku/brand ({ brandId })
|
||||
* - eans: PUT /api/article/:sku/eans ({ eans })
|
||||
@@ -142,7 +142,7 @@ async function importRow(row, { ensureCategory, ensureBrand }) {
|
||||
const brandId = row.brand ? await ensureBrand(row.brand) : null;
|
||||
|
||||
// Create the article under the leaf category.
|
||||
const createRes = await article.create({ parentId: leafCategoryId, name });
|
||||
const createRes = await article.create({ categoryId: leafCategoryId, name });
|
||||
requireObject(createRes, 'POST /api/article');
|
||||
const created = createRes.article;
|
||||
requireDefined(created, 'article');
|
||||
|
||||
Reference in New Issue
Block a user