Skip to content

Commit

Permalink
feat: 步骤栏添加详情页
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiaolulu committed Sep 29, 2024
1 parent 1c62f13 commit d8b23c6
Show file tree
Hide file tree
Showing 8 changed files with 924 additions and 149 deletions.
49 changes: 26 additions & 23 deletions unit-backend/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion unit-backend/api/routers/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
DelCaseView,
CaseDetailView,
CaseListView,
RunCaseView
RunCaseView,
CaseStepDetailView
)


Expand All @@ -18,6 +19,7 @@
path('delete/<int:pk>', DelCaseView.as_view()),
path('detail/<int:pk>', CaseDetailView.as_view()),
path("list", CaseListView.as_view({'get': 'list'})),
path('step/detail/<int:pk>', CaseStepDetailView.as_view())
]


Expand Down
17 changes: 14 additions & 3 deletions unit-backend/api/views/https.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@
from api.models.https import (
Relation,
Api,
Case, ClosedTasks
Case,
ClosedTasks,
Step
)
from api.mixins.magic import (
MagicRetrieveApi, MagicListAPI
MagicRetrieveApi,
MagicListAPI
)
from api.schema.https import (
RelationSerializer,
ApiSerializer,
CaseSerializers,
ClosedTasksSerializers
ClosedTasksSerializers,
CaseStepSerializers
)
from config.settings import MEDIA_ROOT
from api.response.fatcory import ResponseStandard
Expand Down Expand Up @@ -192,6 +196,13 @@ class CaseDetailView(MagicRetrieveApi):
permission_classes = [IsAuthenticated]


class CaseStepDetailView(MagicRetrieveApi):

serializer_class = CaseStepSerializers
queryset = Step.objects.all()
permission_classes = [IsAuthenticated]


class RunCaseView(AsyncAPIView):
permission_classes = [IsAuthenticated]

Expand Down
Loading

0 comments on commit d8b23c6

Please sign in to comment.