浏览代码

设备获取证书BUG 修改3

chenshibin 4 年之前
父节点
当前提交
54b0da2eb0
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      Controller/IotCoreController.py

+ 7 - 0
Controller/IotCoreController.py

@@ -87,6 +87,13 @@ class IotCoreView(View):
                                                   thing_name=res[1]['ThingName'],
                                                   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})
             else: