aboutsummaryrefslogtreecommitdiff
path: root/bot
diff options
context:
space:
mode:
Diffstat (limited to 'bot')
-rw-r--r--bot/bot.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/bot/bot.py b/bot/bot.py
index 9d9b322..f379e95 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -73,6 +73,7 @@ def write_json() -> bool:
73 "createdAt": photo.createdAt.strftime("%Y-%m-%dT%H:%M:%S.000Z"), 73 "createdAt": photo.createdAt.strftime("%Y-%m-%dT%H:%M:%S.000Z"),
74 "uploadedAt": photo.uploadedAt.strftime("%Y-%m-%dT%H:%M:%S.000Z") 74 "uploadedAt": photo.uploadedAt.strftime("%Y-%m-%dT%H:%M:%S.000Z")
75 }) 75 })
76 results.sort(key=lambda x: x["uploadedAt"], reverse=True)
76 with open("database/photos.json", "w") as f: 77 with open("database/photos.json", "w") as f:
77 f.write(json.dumps(results)) 78 f.write(json.dumps(results))
78 return True 79 return True
Powered by cgit v1.2.3 (git 2.41.0)