Browse Source

调整 Django 路由顺序,避免 appToApp/oa2 路径被 rtc 路由拦截导致返回 None 错误

zhangdongming 1 month ago
parent
commit
7247e8b99e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      azoauth/urls.py

+ 2 - 1
azoauth/urls.py

@@ -35,7 +35,6 @@ urlpatterns = [
     path('oa2/rtspStart', index.oa2RtspStartView.as_view()),            # 通知摄像头设备推流
     path('oa2/powerController', index.powerController.as_view()),       # 控制智能插座开关
     re_path('device/(?P<operation>.*)', DeviceController.DeviceView.as_view()),
-    re_path('oa2/(?P<operation>.*)', index.RtcController.as_view()),    # rtc
 
     url(r'^deviceStatus/(?P<operation>.*)$', deviceStatus.deviceStatus.as_view()),  # 更新设备信息等接口
     url(r'^vseesTest/(?P<operation>.*)', index.VesseTest.as_view()),    # test
@@ -43,6 +42,8 @@ urlpatterns = [
     # app to app oauth2验证登录连接
     re_path('appToApp/oa2/(?P<operation>.*)', AppToApp.Oa2View.as_view()),
 
+    re_path('oa2/(?P<operation>.*)', index.RtcController.as_view()),    # rtc
+
     # 域名备案网站
     re_path('(?P<path>.*)', beian.beianPath),