Skip to content

Commit

Permalink
Fix discount route (#601)
Browse files Browse the repository at this point in the history
* Fix discount route

* Changeset
  • Loading branch information
frandiox committed Mar 1, 2023
1 parent adef0fc commit d8821f8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/tall-falcons-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/cli-hydrogen': patch
---

Fix `check routes` command to correctly check the standard route `/discount/<code>` instead of `/discounts/<code>`.
2 changes: 1 addition & 1 deletion packages/cli/src/utils/missing-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const REQUIRED_ROUTES = [
// 'variants/:variantId',
'search',
// 'gift_cards/:storeId/:cardId',
'discounts/:discountCode',
'discount/:discountCode',

'account',
'account/login',
Expand Down
2 changes: 1 addition & 1 deletion packages/hydrogen/src/seo/generate-seo-tags.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ describe('generateSeoTags', () => {
offers: [
{
'@type': 'Offer',
url: 'hydrogen.shop/discounts/1234',
url: 'hydrogen.shop/discount/1234',
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {cartCreate, cartDiscountCodesUpdate} from './cart';
* @example
* Example path applying a discount and redirecting
* ```ts
* /discounts/FREESHIPPING?redirect=/products
* /discount/FREESHIPPING?redirect=/products
*
* ```
* @preserve
Expand Down

0 comments on commit d8821f8

Please sign in to comment.