Fix some JSON serialization issues

This commit is contained in:
Tim Van Baak 2023-06-19 13:50:50 -07:00
parent 648552a736
commit 095c6a7a41
1 changed files with 2 additions and 2 deletions

View File

@ -180,10 +180,10 @@ def update(source_name, item_id):
if "tts" in params: if "tts" in params:
tomorrow = datetime.now() + timedelta(days=1) tomorrow = datetime.now() + timedelta(days=1)
morning = datetime(tomorrow.year, tomorrow.month, tomorrow.day, 6, 0, 0) morning = datetime(tomorrow.year, tomorrow.month, tomorrow.day, 6, 0, 0)
til_then = morning.timestamp() - item["created"] til_then = int(morning.timestamp()) - item["created"]
item["tts"] = til_then item["tts"] = til_then
source.save_item(item) source.save_item(item)
return jsonify(item) return jsonify(item._item)
@app.post("/mass-deactivate/") @app.post("/mass-deactivate/")