from django.urls import path, include, re_path
from rest_framework.routers import DefaultRouter
from .views import SellerViewSet, ProductViewSet, CategoryViewSet, serve_frontend

router = DefaultRouter()
router.register(r'api/categories', CategoryViewSet)
router.register(r'api/sellers', SellerViewSet)
router.register(r'api/products', ProductViewSet)

urlpatterns = [
    path('api/', include(router.urls)),
    re_path(r'^.*$', serve_frontend, name='serve_frontend'),
]
