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

Function maintenanceMenuCreate

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

Source from the content-addressed store, hash-verified

20@api.route('/maintenance-menu', methods=['POST'])
21@restricted_access
22def maintenanceMenuCreate():
23 if not "file" in request.files.keys():
24 return make_response("No file included", 400)
25
26 file = request.files["file"]
27
28 mmenu = maintenanceMenuManager()
29 r = mmenu.checkMenuFile(file)
30
31 if 'error' in r:
32 return make_response(r['error'], 500)
33 else:
34 return jsonify(r)
35
36@api.route("/maintenance-menu", methods=["DELETE"])
37@restricted_access

Callers

nothing calls this directly

Calls 2

maintenanceMenuManagerFunction · 0.90
checkMenuFileMethod · 0.80

Tested by

no test coverage detected