wiki-plugin-shoppe 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/server.js +2 -2
package/package.json
CHANGED
package/server/server.js
CHANGED
|
@@ -683,9 +683,9 @@ async function getShoppeGoods(tenant) {
|
|
|
683
683
|
? `/plugin/shoppe/${tenant.uuid}/post/${encodeURIComponent(title)}`
|
|
684
684
|
: `${getSanoraUrl()}/products/${tenant.uuid}/${encodeURIComponent(title)}`
|
|
685
685
|
};
|
|
686
|
-
const
|
|
686
|
+
const CATEGORY_BUCKET = { book: 'books', music: 'music', post: 'posts', 'post-series': 'posts', album: 'albums', product: 'products' };
|
|
687
|
+
const bucket = goods[CATEGORY_BUCKET[product.category]];
|
|
687
688
|
if (bucket) bucket.push(item);
|
|
688
|
-
else goods.products.push(item);
|
|
689
689
|
}
|
|
690
690
|
|
|
691
691
|
return goods;
|