Beispiel #1
0
def clock():
    if request.method == 'POST':
        data = request.get_json()
        Led.clock = data
        Led.main_update()
        with open('../clock.json', 'w') as f:
            json.dump(data, f)
        return 'OK', 200
Beispiel #2
0
def time():
    if request.method == 'POST':
        data = request.get_json()
        set_time(data)
        Led.main_update()
        return 'OK', 200