MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / removeSoftwarePlugin

Function removeSoftwarePlugin

src/astroprint/api/settings.py:387–406  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

385@api.route("/settings/software/plugins", methods=["DELETE"])
386@restricted_access
387def removeSoftwarePlugin():
388 data = request.json
389 pId = data.get('id', None)
390
391 if pId:
392 pm = pluginManager()
393 r = pm.removePlugin(pId)
394
395 if 'error' in r:
396 error = r['error']
397
398 if error == 'not_found':
399 return make_response('Not Found', 404)
400 else:
401 return make_response(error, 500)
402
403 else:
404 return jsonify(r)
405
406 return make_response('Invalid Request', 400)
407
408@api.route("/settings/software/plugins/install", methods=["POST"])
409@restricted_access

Callers

nothing calls this directly

Calls 3

pluginManagerFunction · 0.90
removePluginMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected