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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server/server.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wiki-plugin-shoppe",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "Multi-tenant digital goods shoppe for federated wiki, powered by Sanora",
5
5
  "keywords": [
6
6
  "wiki",
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 bucket = goods[product.category];
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;