From 68c9c895a6168ff7662724b0291336ac740d0a63 Mon Sep 17 00:00:00 2001 From: Reto Aebersold Date: Fri, 17 Nov 2023 14:53:30 +0100 Subject: [PATCH] chore: move shop urls --- server/config/urls.py | 11 +---------- server/vbv_lernwelt/shop/urls.py | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 server/vbv_lernwelt/shop/urls.py diff --git a/server/config/urls.py b/server/config/urls.py index ab405ebd..9c42e0ea 100644 --- a/server/config/urls.py +++ b/server/config/urls.py @@ -55,12 +55,6 @@ from vbv_lernwelt.importer.views import ( t2l_sync, ) from vbv_lernwelt.notify.views import email_notification_settings -from vbv_lernwelt.shop.views import ( - checkout_vv, - get_billing_address, - transaction_webhook, - update_billing_address, -) from wagtail import urls as wagtail_urls from wagtail.admin import urls as wagtailadmin_urls from wagtail.documents import urls as wagtaildocs_urls @@ -178,10 +172,7 @@ urlpatterns = [ name='edoniq_export_students_and_trainers'), # shop - path(r'api/shop/billing-address/', get_billing_address, name='get-billing-address'), - path(r'api/shop/billing-address/update/', update_billing_address, name='update-billing-address'), - path(r'api/shop/vv/checkout/', checkout_vv, name='checkout-vv'), - path(r'api/shop/transaction/webhook/', django_view_authentication_exempt(transaction_webhook), name='shop-transaction-webhook'), + path("api/shop/", include("shop.urls")), # importer path( diff --git a/server/vbv_lernwelt/shop/urls.py b/server/vbv_lernwelt/shop/urls.py new file mode 100644 index 00000000..c782ba37 --- /dev/null +++ b/server/vbv_lernwelt/shop/urls.py @@ -0,0 +1,22 @@ +from django.urls import path + +from vbv_lernwelt.core.middleware.auth import django_view_authentication_exempt +from vbv_lernwelt.shop.views import ( + checkout_vv, + get_billing_address, + transaction_webhook, + update_billing_address, +) + +urlpatterns = [ + path("billing-address/", get_billing_address, name="get-billing-address"), + path( + "billing-address/update/", update_billing_address, name="update-billing-address" + ), + path("vv/checkout/", checkout_vv, name="checkout-vv"), + path( + "transaction/webhook/", + django_view_authentication_exempt(transaction_webhook), + name="shop-transaction-webhook", + ), +]