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

Function installSoftwarePlugin

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

Source from the content-addressed store, hash-verified

408@api.route("/settings/software/plugins/install", methods=["POST"])
409@restricted_access
410def installSoftwarePlugin():
411 data = request.json
412 file = data.get('file', None)
413 if file:
414 pm = pluginManager()
415 if pm.installFile(file):
416 return jsonify()
417 else:
418 return make_response('Unable to Install', 500)
419
420 return make_response('Invalid Request', 400)
421
422@api.route("/settings/software/license", methods=["GET"])
423@restricted_access

Callers

nothing calls this directly

Calls 3

pluginManagerFunction · 0.90
getMethod · 0.45
installFileMethod · 0.45

Tested by

no test coverage detected