|
@@ -135,13 +135,13 @@ class IotCoreView(View):
|
|
return response.json(0, {'res': res})
|
|
return response.json(0, {'res': res})
|
|
else:
|
|
else:
|
|
dev_qs = Device_Info.objects.filter(UID=uid)
|
|
dev_qs = Device_Info.objects.filter(UID=uid)
|
|
- iot = iotdeviceInfoModel.objects.get(UID=uid)
|
|
|
|
|
|
+ iot = iotdeviceInfoModel.objects.get(uid=uid)
|
|
res = {
|
|
res = {
|
|
'certificateId': iot.certificateId,
|
|
'certificateId': iot.certificateId,
|
|
'certificatePem': iot.certificatePem,
|
|
'certificatePem': iot.certificatePem,
|
|
'publicKey': iot.publicKey,
|
|
'publicKey': iot.publicKey,
|
|
'privateKey': iot.privateKey,
|
|
'privateKey': iot.privateKey,
|
|
- 'endpoint': dev_qs[0]['endpoint']
|
|
|
|
|
|
+ 'endpoint': dev_qs[0].endpoint
|
|
}
|
|
}
|
|
# print('此设备已注册证书')
|
|
# print('此设备已注册证书')
|
|
return response.json(0, {'res': res})
|
|
return response.json(0, {'res': res})
|