()
| 13 | |
| 14 | @api.route('/printer-profile', methods=['PATCH', 'GET']) |
| 15 | def printer_profile_patch(): |
| 16 | ppm = printerProfileManager() |
| 17 | |
| 18 | if request.method == "PATCH": |
| 19 | changes = request.json |
| 20 | if changes.get('check_clear_bed') is False and ppm.data.get('check_clear_bed') is True: |
| 21 | printerManager().set_bed_clear(True) |
| 22 | ppm.set(changes) |
| 23 | ppm.save() |
| 24 | |
| 25 | return jsonify() |
| 26 | |
| 27 | else: |
| 28 | |
| 29 | result = ppm.data.copy() |
| 30 | result.update( {"driverChoices": ppm.driverChoices()} ) |
| 31 | |
| 32 | return jsonify( result ) |
| 33 | |
| 34 | @api.route('/temperature-preset', methods=['POST']) |
| 35 | @restricted_access |
nothing calls this directly
no test coverage detected