Refactor CreditBalanceViewSet for improved readability and error handling. Update SiteDefinitionView to allow public access without authentication. Enhance Vite configuration for shared component paths and debugging logs. Remove inaccessible shared CSS imports in main.tsx.
This commit is contained in:
@@ -9,6 +9,8 @@ from rest_framework import status, viewsets
|
||||
from rest_framework.decorators import action
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.views import APIView
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django.utils.decorators import method_decorator
|
||||
|
||||
from igny8_core.api.base import SiteSectorModelViewSet
|
||||
from igny8_core.api.permissions import IsAuthenticatedAndActive, IsEditorOrAbove
|
||||
@@ -201,6 +203,7 @@ class PublisherViewSet(viewsets.ViewSet):
|
||||
)
|
||||
|
||||
|
||||
@method_decorator(csrf_exempt, name='dispatch')
|
||||
class SiteDefinitionView(APIView):
|
||||
"""
|
||||
Public endpoint to serve deployed site definitions.
|
||||
@@ -208,6 +211,7 @@ class SiteDefinitionView(APIView):
|
||||
No authentication required for public sites.
|
||||
"""
|
||||
permission_classes = [] # Public endpoint
|
||||
authentication_classes = [] # No authentication required
|
||||
|
||||
def get(self, request, site_id):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user