Skip to content

Commit

Permalink
Merge pull request #2541 from TencentBlueKing/develop
Browse files Browse the repository at this point in the history
fix: update open api application detail api (#2539)
  • Loading branch information
zhu327 authored Feb 29, 2024
2 parents 6a7bbcb + d62ce90 commit 72d0273
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion saas/backend/api/application/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
urlpatterns = [
path("", views.ApplicationView.as_view(), name="open.application"),
path("policies/", views.ApplicationCustomPolicyView.as_view(), name="open.application_policy"),
path("<str:sn>/", views.ApplicationDetailView.as_view(), name="open.application_detail"),
path("<str:sn>/", views.ApplicationDetailView.as_view({"get": "retrieve"}), name="open.application_detail"),
]
6 changes: 3 additions & 3 deletions saas/backend/api/application/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from rest_framework import status
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework.viewsets import views
from rest_framework.viewsets import GenericViewSet, views

from backend.api.authentication import ESBAuthentication
from backend.apps.application.models import Application
Expand Down Expand Up @@ -73,7 +73,7 @@ def post(self, request):
return Response({"url": url})


class ApplicationDetailView(views.APIView):
class ApplicationDetailView(GenericViewSet):
"""
接入系统申请详情
"""
Expand All @@ -89,7 +89,7 @@ class ApplicationDetailView(views.APIView):
responses={status.HTTP_200_OK: ApplicationDetailSchemaSLZ(label="申请详情")},
tags=["open"],
)
def get(self, request, *args, **kwargs):
def retrieve(self, request, *args, **kwargs):
instance = self.get_object()
serializer = ApplicationDetailSLZ(instance)
return Response(serializer.data)
Expand Down

0 comments on commit 72d0273

Please sign in to comment.