MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / bath_delete_script

Method bath_delete_script

mod/project/node/executorMod.py:97–110  ·  view source on GitHub ↗
(get)

Source from the content-addressed store, hash-verified

95
96 @staticmethod
97 def bath_delete_script(get):
98 script_ids = list_args(get, 'script_ids')
99 try:
100 script_ids = [int(i) for i in script_ids]
101 except:
102 return json_response(status=False, msg="脚本ID格式错误")
103 if not script_ids:
104 return json_response(status=False, msg="脚本ID不能为空")
105
106 e_db = TaskFlowsDB()
107 err = e_db.Script.delete(script_ids)
108 if err:
109 return json_response(status=False, msg=err)
110 return json_response(status=True, msg="删除成功")
111
112 @staticmethod
113 def create_task(get):

Callers

nothing calls this directly

Calls 4

list_argsFunction · 0.90
json_responseFunction · 0.90
TaskFlowsDBClass · 0.90
deleteMethod · 0.45

Tested by

no test coverage detected