|
@@ -408,6 +408,7 @@ class PcInfo(View):
|
|
|
return response.json(0, res)
|
|
|
|
|
|
def s3delete(self, request_dict, response):
|
|
|
+ global file
|
|
|
token = request_dict.get('token', None)
|
|
|
tko = TokenObject(token)
|
|
|
response.lang = tko.lang
|
|
@@ -417,10 +418,13 @@ class PcInfo(View):
|
|
|
if not userID:
|
|
|
return response.json(104)
|
|
|
id = request_dict.get('id', None)
|
|
|
- param_flag = CommonService.get_param_flag(data=[id])
|
|
|
- if param_flag is not True:
|
|
|
+ package = request_dict.get('package', None)
|
|
|
+ if id and package:
|
|
|
return response.json(444)
|
|
|
- file = Pc_Info.objects.filter(id=id)
|
|
|
+ elif id and package is None:
|
|
|
+ file = Pc_Info.objects.filter(id=id)
|
|
|
+ elif package and id is None:
|
|
|
+ file = Pc_Info.objects.filter(package=package)
|
|
|
if not file.exists():
|
|
|
return response.json(173)
|
|
|
try:
|