Skip to content

Commit

Permalink
cleanup and fix wrong manager in cart completion
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien2p committed Oct 31, 2022
1 parent 6ecdeda commit 1d75454
Show file tree
Hide file tree
Showing 2 changed files with 220 additions and 205 deletions.
4 changes: 3 additions & 1 deletion packages/medusa/src/services/order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ import ShippingProfileService from "./shipping-profile"
import TotalsService from "./totals"
import { TotalsNewService } from "./index"

export const ORDER_CART_ALREADY_EXISTS_ERROR = "Order from cart already exists"

type InjectedDependencies = {
manager: EntityManager
orderRepository: typeof OrderRepository
Expand Down Expand Up @@ -583,7 +585,7 @@ class OrderService extends TransactionBaseService {
if (exists) {
throw new MedusaError(
MedusaError.Types.DUPLICATE_ERROR,
"Order from cart already exists"
ORDER_CART_ALREADY_EXISTS_ERROR
)
}

Expand Down
Loading

0 comments on commit 1d75454

Please sign in to comment.