()
| 385 | @api.route("/settings/software/plugins", methods=["DELETE"]) |
| 386 | @restricted_access |
| 387 | def removeSoftwarePlugin(): |
| 388 | data = request.json |
| 389 | pId = data.get('id', None) |
| 390 | |
| 391 | if pId: |
| 392 | pm = pluginManager() |
| 393 | r = pm.removePlugin(pId) |
| 394 | |
| 395 | if 'error' in r: |
| 396 | error = r['error'] |
| 397 | |
| 398 | if error == 'not_found': |
| 399 | return make_response('Not Found', 404) |
| 400 | else: |
| 401 | return make_response(error, 500) |
| 402 | |
| 403 | else: |
| 404 | return jsonify(r) |
| 405 | |
| 406 | return make_response('Invalid Request', 400) |
| 407 | |
| 408 | @api.route("/settings/software/plugins/install", methods=["POST"]) |
| 409 | @restricted_access |
nothing calls this directly
no test coverage detected