docstrings in ki qualität, weil ki sie geschrieben hat
This commit is contained in:
@@ -8,6 +8,7 @@ socketio = SocketIO(cors_allowed_origins="*", async_mode='threading')
|
||||
|
||||
# function to change the datetime format to isoformat because json does not support datetime
|
||||
def convert_datetimes(obj):
|
||||
"""Convert datetime objects in a dict or list to a specific string format."""
|
||||
if isinstance(obj, dict):
|
||||
return {k: convert_datetimes(v) for k, v in obj.items()}
|
||||
elif isinstance(obj, list):
|
||||
@@ -19,6 +20,7 @@ def convert_datetimes(obj):
|
||||
|
||||
|
||||
def resend_static_data():
|
||||
"""Resend static data to the frontend via SocketIO."""
|
||||
water = load_dict("water")
|
||||
beans = load_dict("beans")
|
||||
machine = load_dict("machine")
|
||||
|
||||
Reference in New Issue
Block a user