refactor: API endpoint

pull/14519/head
wangruidong 6 days ago committed by Bryan
parent d4d903f5c6
commit eafb074fda

@ -14,7 +14,7 @@ router.register(r'login-logs', api.UserLoginLogViewSet, 'login-log')
router.register(r'operate-logs', api.OperateLogViewSet, 'operate-log')
router.register(r'password-change-logs', api.PasswordChangeLogViewSet, 'password-change-log')
router.register(r'job-logs', api.JobLogAuditViewSet, 'job-log')
router.register(r'jobs', api.JobsAuditViewSet, 'jobs')
router.register(r'jobs', api.JobsAuditViewSet, 'job')
router.register(r'my-login-logs', api.MyLoginLogViewSet, 'my-login-log')
router.register(r'user-sessions', api.UserSessionViewSet, 'user-session')

@ -19,7 +19,7 @@ class VariableViewSet(JMSModelViewSet):
http_method_names = ['options', 'get']
@action(methods=[GET], detail=False, serializer_class=VariableFormDataSerializer,
permission_classes=[IsValidUser, ], url_path='form_data')
permission_classes=[IsValidUser, ], url_path='form-data')
def form_data(self, request, *args, **kwargs):
# 只是为了动态返回serializer fields info
return Response({})

@ -15,7 +15,7 @@ bulk_router = BulkRouter()
bulk_router.register(r'adhocs', api.AdHocViewSet, 'adhoc')
bulk_router.register(r'playbooks', api.PlaybookViewSet, 'playbook')
bulk_router.register(r'jobs', api.JobViewSet, 'job')
bulk_router.register(r'variable', api.VariableViewSet, 'variable')
bulk_router.register(r'variables', api.VariableViewSet, 'variable')
bulk_router.register(r'job-executions', api.JobExecutionViewSet, 'job-execution')
router.register(r'celery/period-tasks', api.CeleryPeriodTaskViewSet, 'celery-period-task')

Loading…
Cancel
Save