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

View File

@@ -1,4 +1,4 @@
import { StoreCustomersListPaymentMethodsRes } from '@medusajs/medusa'
import { StoreCustomersListPaymentMethodsRes } from "@medusajs/medusa"
import { ResponsePromise } from "../typings"
import BaseResource from "./base"
@@ -9,8 +9,10 @@ class PaymentMethodsResource extends BaseResource {
* @param customHeaders
* @return {StoreCustomersListPaymentMethodsRes}
*/
list(id: string, customHeaders: Record<string, any> = {}): ResponsePromise<StoreCustomersListPaymentMethodsRes> {
const path = `/store/carts/${id}/payment-methods`
list(
customHeaders: Record<string, any> = {}
): ResponsePromise<StoreCustomersListPaymentMethodsRes> {
const path = `/store/customers/me/payment-methods`
return this.client.request("GET", path, undefined, {}, customHeaders)
}
}