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

Function additionalTasksCreate

src/astroprint/api/additionaltasks.py:19–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17@api.route('/additional-tasks', methods=['POST'])
18@restricted_access
19def additionalTasksCreate():
20 if not "file" in request.files.keys():
21 return make_response("No file included", 400)
22
23 file = request.files["file"]
24
25 atm = additionalTasksManager()
26 r = atm.checkTaskFile(file)
27
28 if 'error' in r:
29 return make_response(r['error'], 500)
30 else:
31 return jsonify(r)
32
33@api.route("/additional-tasks", methods=["DELETE"])
34@restricted_access

Callers

nothing calls this directly

Calls 2

additionalTasksManagerFunction · 0.90
checkTaskFileMethod · 0.80

Tested by

no test coverage detected