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

Function installTask

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

Source from the content-addressed store, hash-verified

56@api.route("/additional-tasks/install", methods=["POST"])
57@restricted_access
58def installTask():
59 data = request.json
60 file = data.get('file', None)
61 if file:
62 atm = additionalTasksManager()
63 if atm.installFile(file):
64 return jsonify()
65 else:
66 return make_response('Unable to Install', 500)
67
68 return make_response('Invalid Request', 400)

Callers

nothing calls this directly

Calls 3

additionalTasksManagerFunction · 0.90
getMethod · 0.45
installFileMethod · 0.45

Tested by

no test coverage detected