chanjunkai 5 жил өмнө
parent
commit
282f87cf6f

+ 2 - 0
azoauth/urls.py

@@ -27,5 +27,7 @@ urlpatterns = [
     path('oa2/discoverydevice', index.oa2DiscoveryDevice.as_view()),
     #新增
     path('oa2/stoprtsp', index.testRunSendStop),
+    #测试服务器是否正常接口
+    path('oa2/test', index.test),
 
 ]

+ 3 - 0
controller/index.py

@@ -427,6 +427,9 @@ def testRunSendStop(request):
         print("back0----", back[0].decode())  # 注意需要进行解码操作,默认输出的是字节
         print("back1----", back[1].decode())  # back是一个元祖,可以通过元祖取值的方式获取结果
         return JsonResponse({'msg': 'stop Stream', 'code': 0})
+#测试是否正常接口
+def test(request):
+    return JsonResponse({'msg': 'Server running normal', 'code': 0})
 
 
 '''