Skip to content

Commit

Permalink
Merge pull request #24 from SpearDevs/disabling-localised-urls
Browse files Browse the repository at this point in the history
Disabling localised urls
  • Loading branch information
TomaszLach2 authored Aug 9, 2023
2 parents 241a9be + 56d3e45 commit d8e1048
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
8 changes: 4 additions & 4 deletions config/routing/shop_routing.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
speardevs_push_notifications_section:
path: /{_locale}/account/push-notifications
path: /account/push-notifications
defaults:
_controller: 'SpearDevs\SyliusPushNotificationsPlugin\Controller\Shop\PushNotificationAction'
template: '@SpearDevsSyliusPushNotificationsPlugin/Shop/Account/push_notification.html.twig'

speardevs_push_notifications_history_index:
path: /{_locale}/account/push-notifications-history
path: /account/push-notifications-history
methods: [ GET ]
defaults:
_controller: speardevs_sylius_push_notifications_plugin.controller.push_notification_history::indexAction
Expand All @@ -23,7 +23,7 @@ speardevs_push_notifications_history_index:
- "expr:service('sylius.context.customer').getCustomer()"

speardevs_push_notifications_history_mark_as_received:
path: /{_locale}/account/push-notifications-history/{id}/mark-as-received
path: /account/push-notifications-history/{id}/mark-as-received
methods: [ PUT ]
defaults:
_controller: speardevs_sylius_push_notifications_plugin.controller.push_notification_history::applyStateMachineTransitionAction
Expand All @@ -36,4 +36,4 @@ speardevs_push_notifications_history_mark_as_received:

bentools_webpush:
resource: '@WebPushBundle/Resources/config/routing.xml'
prefix: /{_locale}/webpush
prefix: /webpush
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{ stimulus_controller('shop/push-notifications', {
publicKey: app.request.server.get('WEBPUSH_PUBLIC_KEY'),
serviceWorkerPath: '/serviceWorker.js',
subscribeUrl: '/' ~ app.request.locale ~ '/webpush/'
subscribeUrl: '/webpush/'
}) }}
>
<button
Expand Down
1 change: 1 addition & 0 deletions tests/Application/config/packages/_sylius.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ parameters:
sylius_shop:
product_grid:
include_all_descendants: true
locale_switcher: storage

sylius_api:
enabled: true
3 changes: 3 additions & 0 deletions tests/Application/config/packages/security.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
parameters:
sylius.security.shop_regex: "^(?:/(?!%sylius_admin.path_name%|api/.*|api$|media/.*)[^/]++)?"

security:
enable_authenticator_manager: true
providers:
Expand Down
9 changes: 0 additions & 9 deletions tests/Application/config/routes/sylius_shop.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
sylius_shop:
resource: "@SyliusShopBundle/Resources/config/routing.yml"
prefix: /{_locale}
requirements:
_locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$

sylius_shop_payum:
resource: "@SyliusShopBundle/Resources/config/routing/payum.yml"

sylius_shop_default_locale:
path: /
methods: [GET]
defaults:
_controller: sylius.controller.shop.locale_switch::switchAction

0 comments on commit d8e1048

Please sign in to comment.