feat: added creation endpoints

This commit is contained in:
2024-03-25 00:23:03 +01:00
parent 6b04fe7e23
commit 43338ceeec
16 changed files with 287 additions and 97 deletions
+22
View File
@@ -0,0 +1,22 @@
from rest_framework.routers import DefaultRouter
from shop.api.v1.viewsets import (
TaxViewSet,
CustomerViewSet,
ProductViewSet,
ProductPriceViewSet,
OrderViewSet,
OrderLineViewSet,
)
router = DefaultRouter()
router.register("taxes", TaxViewSet)
router.register("customers", CustomerViewSet)
router.register("product", ProductViewSet)
router.register("product-prices", ProductPriceViewSet)
router.register("orders", OrderViewSet)
router.register("orders/(?P<order_id>[^/.]+)/lines", OrderLineViewSet)
urlpatterns = router.urls