Browse Source

增加测试controller

WuYiPei 5 năm trước cách đây
mục cha
commit
bac0c0ff80
2 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 2 1
      AnsjerPush/urls.py
  2. 5 0
      Controller/testController.py

+ 2 - 1
AnsjerPush/urls.py

@@ -15,7 +15,7 @@ Including another URLconf
 """
 from django.contrib import admin
 from django.urls import path
-from Controller import DetectController,ShadowController
+from Controller import DetectController,ShadowController,testController
 
 
 urlpatterns = [
@@ -23,4 +23,5 @@ urlpatterns = [
     path('notify/push', DetectController.NotificationView.as_view()),
     path('deviceShadow/update', ShadowController.update_device_shadow),
     path('deviceShadow/generateUTK', ShadowController.generate_utk),
+    path('testtest/',testController.index)
 ]

+ 5 - 0
Controller/testController.py

@@ -0,0 +1,5 @@
+from django.http import HttpResponse
+
+
+def index(request):
+    return HttpResponse("测试成功!")