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

Function installMaintenanceMenu

src/astroprint/api/maintenancemenu.py:61–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

59@api.route("/maintenance-menu/install", methods=["POST"])
60@restricted_access
61def installMaintenanceMenu():
62 data = request.json
63 file = data.get('file', None)
64 if file:
65 mmenu = maintenanceMenuManager()
66 if mmenu.installFile(file):
67 return jsonify()
68 else:
69 return make_response('Unable to Install', 500)
70
71 return make_response('Invalid Request', 400)

Callers

nothing calls this directly

Calls 3

maintenanceMenuManagerFunction · 0.90
getMethod · 0.45
installFileMethod · 0.45

Tested by

no test coverage detected