fix(medusa): Add free shipping functionality (#241)
This commit is contained in:
@@ -65,7 +65,7 @@ describe("POST /store/carts/:id", () => {
|
||||
expect(CartServiceMock.retrieve).toHaveBeenCalledWith(
|
||||
IdMap.getId("emptyCart"),
|
||||
{
|
||||
relations: ["payment_sessions"],
|
||||
relations: ["payment_sessions", "shipping_methods"],
|
||||
}
|
||||
)
|
||||
expect(CartServiceMock.retrieve).toHaveBeenCalledWith(
|
||||
|
||||
@@ -104,7 +104,7 @@ export default async (req, res) => {
|
||||
|
||||
// If the cart has payment sessions update these
|
||||
const updated = await cartService.retrieve(id, {
|
||||
relations: ["payment_sessions"],
|
||||
relations: ["payment_sessions", "shipping_methods"],
|
||||
})
|
||||
|
||||
if (updated.payment_sessions?.length && !value.region_id) {
|
||||
|
||||
Reference in New Issue
Block a user