From 6b9ec07d86f2fb77eada5b44415362dccd0a3abe Mon Sep 17 00:00:00 2001 From: goncy Date: Wed, 15 Sep 2021 14:58:56 -0300 Subject: [PATCH] Adapt providers --- framework/bigcommerce/api/endpoints/checkout/index.ts | 4 ++-- .../endpoints/checkout/{checkout.ts => submit-checkout.ts} | 4 ++-- framework/saleor/api/endpoints/checkout/index.ts | 4 ++-- framework/shopify/api/endpoints/checkout/checkout.ts | 4 ++-- framework/shopify/api/endpoints/checkout/index.ts | 4 ++-- framework/swell/api/endpoints/checkout/index.ts | 4 ++-- framework/vendure/api/endpoints/checkout/index.ts | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) rename framework/bigcommerce/api/endpoints/checkout/{checkout.ts => submit-checkout.ts} (95%) diff --git a/framework/bigcommerce/api/endpoints/checkout/index.ts b/framework/bigcommerce/api/endpoints/checkout/index.ts index eaba32e47..99263bdb7 100644 --- a/framework/bigcommerce/api/endpoints/checkout/index.ts +++ b/framework/bigcommerce/api/endpoints/checkout/index.ts @@ -2,13 +2,13 @@ import { GetAPISchema, createEndpoint } from '@commerce/api' import checkoutEndpoint from '@commerce/api/endpoints/checkout' import type { CheckoutSchema } from '../../../types/checkout' import type { BigcommerceAPI } from '../..' -import checkout from './checkout' +import submitCheckout from './submit-checkout' export type CheckoutAPI = GetAPISchema export type CheckoutEndpoint = CheckoutAPI['endpoint'] -export const handlers: CheckoutEndpoint['handlers'] = { checkout } +export const handlers: CheckoutEndpoint['handlers'] = { submitCheckout } const checkoutApi = createEndpoint({ handler: checkoutEndpoint, diff --git a/framework/bigcommerce/api/endpoints/checkout/checkout.ts b/framework/bigcommerce/api/endpoints/checkout/submit-checkout.ts similarity index 95% rename from framework/bigcommerce/api/endpoints/checkout/checkout.ts rename to framework/bigcommerce/api/endpoints/checkout/submit-checkout.ts index 15c834557..5c135df36 100644 --- a/framework/bigcommerce/api/endpoints/checkout/checkout.ts +++ b/framework/bigcommerce/api/endpoints/checkout/submit-checkout.ts @@ -5,7 +5,7 @@ import { uuid } from 'uuidv4' const fullCheckout = true -const checkout: CheckoutEndpoint['handlers']['checkout'] = async ({ +const submitCheckout: CheckoutEndpoint['handlers']['submitCheckout'] = async ({ req, res, config, @@ -87,4 +87,4 @@ const checkout: CheckoutEndpoint['handlers']['checkout'] = async ({ res.end() } -export default checkout +export default submitCheckout diff --git a/framework/saleor/api/endpoints/checkout/index.ts b/framework/saleor/api/endpoints/checkout/index.ts index f15672435..018665548 100644 --- a/framework/saleor/api/endpoints/checkout/index.ts +++ b/framework/saleor/api/endpoints/checkout/index.ts @@ -6,7 +6,7 @@ export type CheckoutAPI = GetAPISchema export type CheckoutEndpoint = CheckoutAPI['endpoint'] -const checkout: CheckoutEndpoint['handlers']['checkout'] = async ({ +const submitCheckout: CheckoutEndpoint['handlers']['submitCheckout'] = async ({ req, res, config, @@ -47,7 +47,7 @@ const checkout: CheckoutEndpoint['handlers']['checkout'] = async ({ } } -export const handlers: CheckoutEndpoint['handlers'] = { checkout } +export const handlers: CheckoutEndpoint['handlers'] = { submitCheckout } const checkoutApi = createEndpoint({ handler: checkoutEndpoint, diff --git a/framework/shopify/api/endpoints/checkout/checkout.ts b/framework/shopify/api/endpoints/checkout/checkout.ts index 0c340a129..97ac77381 100644 --- a/framework/shopify/api/endpoints/checkout/checkout.ts +++ b/framework/shopify/api/endpoints/checkout/checkout.ts @@ -6,7 +6,7 @@ import { import associateCustomerWithCheckoutMutation from '../../../utils/mutations/associate-customer-with-checkout' import type { CheckoutEndpoint } from '.' -const checkout: CheckoutEndpoint['handlers']['checkout'] = async ({ +const submitCheckout: CheckoutEndpoint['handlers']['submitCheckout'] = async ({ req, res, config, @@ -35,4 +35,4 @@ const checkout: CheckoutEndpoint['handlers']['checkout'] = async ({ } } -export default checkout +export default submitCheckout diff --git a/framework/shopify/api/endpoints/checkout/index.ts b/framework/shopify/api/endpoints/checkout/index.ts index 5d78f451b..72b86cae2 100644 --- a/framework/shopify/api/endpoints/checkout/index.ts +++ b/framework/shopify/api/endpoints/checkout/index.ts @@ -2,13 +2,13 @@ import { GetAPISchema, createEndpoint } from '@commerce/api' import checkoutEndpoint from '@commerce/api/endpoints/checkout' import type { CheckoutSchema } from '../../../types/checkout' import type { ShopifyAPI } from '../..' -import checkout from './checkout' +import submitCheckout from './submit-checkout' export type CheckoutAPI = GetAPISchema export type CheckoutEndpoint = CheckoutAPI['endpoint'] -export const handlers: CheckoutEndpoint['handlers'] = { checkout } +export const handlers: CheckoutEndpoint['handlers'] = { submitCheckout } const checkoutApi = createEndpoint({ handler: checkoutEndpoint, diff --git a/framework/swell/api/endpoints/checkout/index.ts b/framework/swell/api/endpoints/checkout/index.ts index ab17a3767..9847d8420 100644 --- a/framework/swell/api/endpoints/checkout/index.ts +++ b/framework/swell/api/endpoints/checkout/index.ts @@ -3,7 +3,7 @@ import { CheckoutSchema } from '@commerce/types/checkout' import { SWELL_CHECKOUT_URL_COOKIE } from '../../../const' import checkoutEndpoint from '@commerce/api/endpoints/checkout' -const checkout: CheckoutEndpoint['handlers']['checkout'] = async ({ +const submitCheckout: CheckoutEndpoint['handlers']['submitCheckout'] = async ({ req, res, config, @@ -17,7 +17,7 @@ const checkout: CheckoutEndpoint['handlers']['checkout'] = async ({ res.redirect('/cart') } } -export const handlers: CheckoutEndpoint['handlers'] = { checkout } +export const handlers: CheckoutEndpoint['handlers'] = { submitCheckout } export type CheckoutAPI = GetAPISchema export type CheckoutEndpoint = CheckoutAPI['endpoint'] diff --git a/framework/vendure/api/endpoints/checkout/index.ts b/framework/vendure/api/endpoints/checkout/index.ts index 00c17f993..f138af6be 100644 --- a/framework/vendure/api/endpoints/checkout/index.ts +++ b/framework/vendure/api/endpoints/checkout/index.ts @@ -3,7 +3,7 @@ import { CommerceAPI, createEndpoint, GetAPISchema } from '@commerce/api' import { CheckoutSchema } from '@commerce/types/checkout' import checkoutEndpoint from '@commerce/api/endpoints/checkout' -const checkout: CheckoutEndpoint['handlers']['checkout'] = async ({ +const submitCheckout: CheckoutEndpoint['handlers']['submitCheckout'] = async ({ req, res, config, @@ -48,7 +48,7 @@ export type CheckoutAPI = GetAPISchema export type CheckoutEndpoint = CheckoutAPI['endpoint'] -export const handlers: CheckoutEndpoint['handlers'] = { checkout } +export const handlers: CheckoutEndpoint['handlers'] = { submitCheckout } const checkoutApi = createEndpoint({ handler: checkoutEndpoint,