fix: endpoint path fixed
This commit is contained in:
@@ -55,7 +55,7 @@ urlpatterns: list[object] = [
|
|||||||
name="contract-owners-api-view"
|
name="contract-owners-api-view"
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
r"/contract-owners/<uuid:owner_id>/files/<uuid:file_id>",
|
r"/contracts/<uuid:pk>/files",
|
||||||
views.ContractAttachedFileApiView.as_view(),
|
views.ContractAttachedFileApiView.as_view(),
|
||||||
name="contract-attached-files-api-view"
|
name="contract-attached-files-api-view"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from drf_spectacular.utils import extend_schema
|
from drf_spectacular.utils import extend_schema
|
||||||
from rest_framework.permissions import AllowAny, IsAdminUser, IsAuthenticated # type: ignore
|
from rest_framework.permissions import AllowAny, IsAdminUser # type: ignore
|
||||||
from rest_framework.viewsets import ModelViewSet # type: ignore
|
from rest_framework.viewsets import ModelViewSet # type: ignore
|
||||||
from rest_framework.views import APIView # type: ignore
|
|
||||||
from rest_framework.generics import GenericAPIView # type: ignore
|
from rest_framework.generics import GenericAPIView # type: ignore
|
||||||
from core.utils.views import BaseApiViewMixin
|
from core.utils.views import BaseApiViewMixin
|
||||||
|
|
||||||
|
|||||||
@@ -63,9 +63,7 @@ class ContractOwnerAttachedFileApiView(BaseApiViewMixin, GenericAPIView): # typ
|
|||||||
permission_classes = [AllowAny]
|
permission_classes = [AllowAny]
|
||||||
queryset = ContractOwnerModel.objects.all()
|
queryset = ContractOwnerModel.objects.all()
|
||||||
|
|
||||||
method_permission_classes = {
|
method_permission_classes = {"delete": [AllowAny]}
|
||||||
"delete": [AllowAny]
|
|
||||||
}
|
|
||||||
method_serializer_class = {}
|
method_serializer_class = {}
|
||||||
|
|
||||||
@extend_schema(
|
@extend_schema(
|
||||||
|
|||||||
Reference in New Issue
Block a user