Added i18n for custom pages

This commit is contained in:
Luis Alvarez
2020-10-25 13:31:12 -05:00
parent e9092a4031
commit 7bc2c408ee
6 changed files with 64 additions and 47 deletions

View File

@@ -22,7 +22,7 @@ export type ProductsHandlers = {
const METHODS = ['GET']
// TODO: a complete implementation should have schema validation for `req.body`
const productApi: BigcommerceApiHandler<
const productsApi: BigcommerceApiHandler<
SearchProductsData,
ProductsHandlers
> = async (req, res, config, handlers) => {
@@ -45,4 +45,4 @@ const productApi: BigcommerceApiHandler<
export const handlers = { getProducts }
export default createApiHandler(productApi, handlers, {})
export default createApiHandler(productsApi, handlers, {})

View File

@@ -1,4 +1,5 @@
export interface CommerceAPIConfig {
locale?: string
commerceUrl: string
apiToken: string
cartCookie: string