diff options
Diffstat (limited to 'bot/bot.py')
-rw-r--r-- | bot/bot.py | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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 |