fix(medusa): Fix typo in discounts error message (#5853)

This commit is contained in:
Sajarin M
2024-01-07 19:07:32 +05:30
committed by GitHub
parent 46d610bc55
commit 6b0b3fed7a
3 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
Fix typo in discounts error message

View File

@@ -75,7 +75,7 @@ describe("DiscountService", () => {
.catch((e) => e)
expect(err.type).toEqual("invalid_data")
expect(err.message).toEqual("Discount must have atleast 1 region")
expect(err.message).toEqual("Discount must have at least 1 region")
expect(discountRepository.create).toHaveBeenCalledTimes(0)
})

View File

@@ -210,7 +210,7 @@ class DiscountService extends TransactionBaseService {
if (!discount.regions?.length) {
throw new MedusaError(
MedusaError.Types.INVALID_DATA,
"Discount must have atleast 1 region"
"Discount must have at least 1 region"
)
}