浏览代码

resapiful

chenjunkai 5 年之前
父节点
当前提交
5602ef490c
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      Controller/AppInfo.py

+ 5 - 1
Controller/AppInfo.py

@@ -197,6 +197,7 @@ class AppInfo(View):
         downloadLink = request_dict.get('downloadLink', None)
         f = self.request.FILES.get('file', None)
         try:
+            res = {}
             app_info = App_Info.objects.get(id=id)
             if appBundleId:
                 app_info.appBundleId = appBundleId
@@ -231,11 +232,14 @@ class AppInfo(View):
                     pass
                 else:
                     app_info.img = rv_path
+                    res['img'] = SERVER_DOMAIN + 'sysfile/' + rv_path
             app_info.save()
         except Exception as e:
             return response.json(404, repr(e))
         else:
-            return response.json(0, {'update_id': app_info.id, 'update_time': str(app_info.update_time)})
+            res['update_id'] = app_info.id
+            res['update_time'] = str(app_info.update_time)
+            return response.json(0, res)
 
     def delete(self, request_dict, userID, response):
         own_perm = ModelService.check_perm(userID=userID, permID=10)