Преглед на файлове

更新吸虫塔图片接口

林轩 преди 4 месеца
родител
ревизия
e72b1b9f1e
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      apps/Equipment/views.py

+ 2 - 2
apps/Equipment/views.py

@@ -856,7 +856,7 @@ class XctDevicePhotoView(APIView):
             default_cache.set(str(uid)+"_xct_list", xct_dict_cache,60*5)
             d_id = xct_dict_cache[request_data["device_id"]]
 
-        result = {"total_counts":0,"itmes":[]}
+        result = {"total_counts":0,"items":[]}
 
         data_m = MongoDBTools(db_name='smartfarming', table_name='sa_device_xct_photo')
         data_project = {
@@ -902,7 +902,7 @@ class XctDevicePhotoView(APIView):
                         Result_image = settings.CONFIG["image_url"]["xct_img_result_forward"] + "/" + indentify_photo
             else:
                 Result_image = "0"
-            result["itmes"].append({"uptime":item["addtime"],"Image":Image,"Result_image":Result_image,"Result":Result})
+            result["items"].append({"uptime":item["addtime"],"Image":Image,"Result_image":Result_image,"Result":Result})
         return Response(result)