From 500545bbcd063e05f02be43ec7a491c4edb201e8 Mon Sep 17 00:00:00 2001 From: Oliver Heywood Date: Mon, 11 Oct 2021 10:31:02 -0500 Subject: [PATCH] don't need sort stuff. update comment --- .../api/endpoints/catalog/products/get-products.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/framework/ordercloud/api/endpoints/catalog/products/get-products.ts b/framework/ordercloud/api/endpoints/catalog/products/get-products.ts index 3e8f2faad..e8be8b6fb 100644 --- a/framework/ordercloud/api/endpoints/catalog/products/get-products.ts +++ b/framework/ordercloud/api/endpoints/catalog/products/get-products.ts @@ -1,16 +1,8 @@ -import { Product } from '@commerce/types/product' -import { RawProduct } from '@framework/types/product' + import { normalize as normalizeProduct } from '@framework/utils/product' import { ProductsEndpoint } from '.' - -const SORT: { [key: string]: string | undefined } = { - latest: 'id', - trending: 'total_sold', - price: 'price', -} - -// Return current cart info +// Get products for the product list page. Search and category filter implemented. Sort and brand filter not implemented. const getProducts: ProductsEndpoint['handlers']['getProducts'] = async ({ req, res,