fix(medusa-js): Use correct customer payment methods path (#1934)

This commit is contained in:
Oliver Windall Juhl
2022-07-28 20:43:42 +02:00
committed by GitHub
parent 3b28998421
commit 1998902a94
@@ -1,4 +1,4 @@
import { StoreCustomersListPaymentMethodsRes } from '@medusajs/medusa' import { StoreCustomersListPaymentMethodsRes } from "@medusajs/medusa"
import { ResponsePromise } from "../typings" import { ResponsePromise } from "../typings"
import BaseResource from "./base" import BaseResource from "./base"
@@ -9,8 +9,10 @@ class PaymentMethodsResource extends BaseResource {
* @param customHeaders * @param customHeaders
* @return {StoreCustomersListPaymentMethodsRes} * @return {StoreCustomersListPaymentMethodsRes}
*/ */
list(id: string, customHeaders: Record<string, any> = {}): ResponsePromise<StoreCustomersListPaymentMethodsRes> { list(
const path = `/store/carts/${id}/payment-methods` customHeaders: Record<string, any> = {}
): ResponsePromise<StoreCustomersListPaymentMethodsRes> {
const path = `/store/customers/me/payment-methods`
return this.client.request("GET", path, undefined, {}, customHeaders) return this.client.request("GET", path, undefined, {}, customHeaders)
} }
} }