Skip to content

Commit eb2ed2b

Browse files
committed
fix: vendor stock location authorization
1 parent 2cba8a3 commit eb2ed2b

File tree

1 file changed

+10
-0
lines changed
  • packages/modules/b2c-core/src/api/vendor/stock-locations

1 file changed

+10
-0
lines changed

packages/modules/b2c-core/src/api/vendor/stock-locations/middlewares.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ export const vendorStockLocationsMiddlewares: MiddlewareRoute[] = [
5656
)
5757
]
5858
},
59+
{
60+
method: ['DELETE'],
61+
matcher: '/vendor/stock-locations/:id',
62+
middlewares: [
63+
checkResourceOwnershipByResourceId({
64+
entryPoint: sellerStockLocationLink.entryPoint,
65+
filterField: 'stock_location_id'
66+
}),
67+
]
68+
},
5969
{
6070
method: ['POST'],
6171
matcher: '/vendor/stock-locations/:id',

0 commit comments

Comments
 (0)