()
| 33 | @api.route("/additional-tasks", methods=["DELETE"]) |
| 34 | @restricted_access |
| 35 | def deleteTask(): |
| 36 | data = request.json |
| 37 | tId = data.get('id', None) |
| 38 | |
| 39 | if tId: |
| 40 | atm = additionalTasksManager() |
| 41 | r = atm.removeTask(tId) |
| 42 | |
| 43 | if 'error' in r: |
| 44 | error = r['error'] |
| 45 | |
| 46 | if error == 'not_found': |
| 47 | return make_response('Not Found', 404) |
| 48 | else: |
| 49 | return make_response(error, 500) |
| 50 | |
| 51 | else: |
| 52 | return jsonify(r) |
| 53 | |
| 54 | return make_response('Invalid Request', 400) |
| 55 | |
| 56 | @api.route("/additional-tasks/install", methods=["POST"]) |
| 57 | @restricted_access |
nothing calls this directly
no test coverage detected