()
| 369 | @api.route("/settings/software/plugins", methods=["POST"]) |
| 370 | @restricted_access |
| 371 | def uploadSoftwarePlugin(): |
| 372 | if not "file" in request.files.keys(): |
| 373 | return make_response("No file included", 400) |
| 374 | |
| 375 | file = request.files["file"] |
| 376 | |
| 377 | pm = pluginManager() |
| 378 | r = pm.checkFile(file) |
| 379 | |
| 380 | if 'error' in r: |
| 381 | return make_response(r['error'], 500) |
| 382 | else: |
| 383 | return jsonify(r) |
| 384 | |
| 385 | @api.route("/settings/software/plugins", methods=["DELETE"]) |
| 386 | @restricted_access |
nothing calls this directly
no test coverage detected