Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(medusa-js): remove unnecessary query field in AdminInventoryItemsResource.deleteLocationLevel method #5941

Merged
merged 4 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/eighty-mails-behave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@medusajs/medusa-js": patch
---

fix(medusa-js): remove unnecessary `query` field in `AdminInventoryItemsResource.deleteLocationLevel` method
9 changes: 1 addition & 8 deletions packages/medusa-js/src/resources/admin/inventory-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ class AdminInventoryItemsResource extends BaseResource {
* Delete a location level of an Inventory Item.
* @param {string} inventoryItemId - The ID of the inventory item.
* @param {string} locationId - The ID of the location level to delete.
* @param {AdminGetInventoryItemsParams} query - Configurations to apply on the returned inventory item.
* @param {Record<string, any>} customHeaders - Custom headers to attach to the request.
* @returns {ResponsePromise<AdminInventoryItemsRes>} the inventory item's details.
*
Expand All @@ -305,15 +304,9 @@ class AdminInventoryItemsResource extends BaseResource {
deleteLocationLevel(
inventoryItemId: string,
locationId: string,
query?: AdminGetInventoryItemsParams,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminInventoryItemsRes> {
let path = `/admin/inventory-items/${inventoryItemId}/location-levels/${locationId}`

if (query) {
const queryString = qs.stringify(query)
path += `?${queryString}`
}
const path = `/admin/inventory-items/${inventoryItemId}/location-levels/${locationId}`

return this.client.request("DELETE", path, undefined, {}, customHeaders)
}
Expand Down