mirror of
https://github.com/vercel/commerce.git
synced 2025-07-25 19:21:23 +00:00
Allow updating line item quantity
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import * as qs from 'qs'
|
||||
import { errors } from '@spree/storefront-api-v2-sdk'
|
||||
import type { CreateFetcher } from '@spree/storefront-api-v2-sdk/types/interfaces/ClientConfig'
|
||||
import { Request } from 'node-fetch'
|
||||
|
||||
// TODO: Fix rawFetch any type.
|
||||
const createCreateFetchFetcher =
|
||||
({ fetch: rawFetch }): CreateFetcher =>
|
||||
// TODO: Fix rawFetch any type.
|
||||
(fetcherOptions) => {
|
||||
const { FetchError } = errors
|
||||
const sharedHeaders = {
|
||||
@@ -38,7 +37,7 @@ const createCreateFetchFetcher =
|
||||
|
||||
try {
|
||||
const response = await rawFetch(absoluteUrl.toString(), {
|
||||
method,
|
||||
method: method.toUpperCase(),
|
||||
headers: { ...sharedHeaders, ...headers },
|
||||
...payload,
|
||||
})
|
||||
|
Reference in New Issue
Block a user