from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import RekkinsViewSet, download_invoice_pdf  # <--- ŠEIT nomainīts uz RekkinsViewSet

router = DefaultRouter()
router.register(r'', RekkinsViewSet, basename='invoice')  # <--- ŠEIT nomainīts uz RekkinsViewSet

urlpatterns = [
    # PDF lejupielādes adrese
    path('<int:invoice_id>/pdf/', download_invoice_pdf, name='download-pdf'),
    
    # Visas pārējās API adreses rēķiniem
    path('', include(router.urls)),
]