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

Method remove_service

mod/project/python/serviceMod.py:723–737  ·  view source on GitHub ↗
(get)

Source from the content-addressed store, hash-verified

721
722 @staticmethod
723 def remove_service(get):
724 try:
725 project_name = get.project_name.strip()
726 sid = get.sid.strip()
727 except:
728 return json_response(False, '参数错误')
729
730 s_mgr = ServiceManager.new_mgr(project_name)
731 if isinstance(s_mgr, str):
732 return json_response(False, s_mgr)
733 res = s_mgr.remove_service(sid)
734 if isinstance(res, str):
735 return json_response(False, res)
736
737 return json_response(True, msg="删除成功")
738
739 @staticmethod
740 def handle_service(get):

Callers

nothing calls this directly

Calls 2

json_responseFunction · 0.90
new_mgrMethod · 0.80

Tested by

no test coverage detected