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

Function changeSerialLogs

src/astroprint/api/settings.py:640–653  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

638@api.route("/settings/software/logs/serial", methods=['PUT'])
639@restricted_access
640def changeSerialLogs():
641 data = request.json
642
643 if data and 'active' in data:
644 s = settings()
645 s.setBoolean(['serial', 'log'], data['active'])
646 s.save()
647
648 printerManager().setSerialDebugLogging(data['active'])
649
650 return jsonify()
651
652 else:
653 return ("Wrong data sent in.", 400)
654
655@api.route("/settings/software/storage/logs", methods=['DELETE'])
656@restricted_access

Callers

nothing calls this directly

Calls 5

settingsFunction · 0.90
printerManagerFunction · 0.90
setBooleanMethod · 0.80
setSerialDebugLoggingMethod · 0.80
saveMethod · 0.45

Tested by

no test coverage detected