mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
don't need sort stuff. update comment
This commit is contained in:
@@ -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 { normalize as normalizeProduct } from '@framework/utils/product'
|
||||||
import { ProductsEndpoint } from '.'
|
import { ProductsEndpoint } from '.'
|
||||||
|
|
||||||
|
// Get products for the product list page. Search and category filter implemented. Sort and brand filter not implemented.
|
||||||
const SORT: { [key: string]: string | undefined } = {
|
|
||||||
latest: 'id',
|
|
||||||
trending: 'total_sold',
|
|
||||||
price: 'price',
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return current cart info
|
|
||||||
const getProducts: ProductsEndpoint['handlers']['getProducts'] = async ({
|
const getProducts: ProductsEndpoint['handlers']['getProducts'] = async ({
|
||||||
req,
|
req,
|
||||||
res,
|
res,
|
||||||
|
Reference in New Issue
Block a user