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

Function changeUpdateChannelSettings

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

Source from the content-addressed store, hash-verified

517@api.route("/settings/software/advanced/update-channel", methods=["PUT"])
518@restricted_access
519def changeUpdateChannelSettings():
520 data = request.json
521
522 if data and 'channel' in data:
523 s = settings()
524 s.setInt(['software', 'channel'], data['channel'])
525 s.save()
526
527 return jsonify()
528
529 else:
530 return ("Wrong data sent in.", 400)
531
532@api.route("/settings/software/settings", methods=["DELETE"])
533@restricted_access

Callers

nothing calls this directly

Calls 3

settingsFunction · 0.90
setIntMethod · 0.80
saveMethod · 0.45

Tested by

no test coverage detected