Parcourir la source

设备获取证书BUG 修改3

chenshibin il y a 4 ans
Parent
commit
54b0da2eb0
1 fichiers modifiés avec 7 ajouts et 0 suppressions
  1. 7 0
      Controller/IotCoreController.py

+ 7 - 0
Controller/IotCoreController.py

@@ -87,6 +87,13 @@ class IotCoreView(View):
                                                   thing_name=res[1]['ThingName'],
                                                   thing_name=res[1]['ThingName'],
                                                   token_iot_number=token_iot_number
                                                   token_iot_number=token_iot_number
                                                   )
                                                   )
+                res = {
+                    'certificateId': res[0]['certificateId'],
+                    'certificatePem': res[0]['certificatePem'],
+                    'publicKey': res[0]['publicKey'],
+                    'privateKey': res[0]['privateKey'],
+                    'endpoint': res[0]['endpoint']
+                }
                 return response.json(0, {'res': res})
                 return response.json(0, {'res': res})
             else:
             else: