Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions endpoint/mh_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ def do_POST(self):
data = base64.b64decode(entry['payload'])
timestamp = int.from_bytes(data[0:4], 'big') + 978307200
if (timestamp > startdate):
# Only add datePublished if Apple does not return the key
if not entry.get("datePublished"):
entry["datePublished"] = timestamp
newResults[timestamp] = entry

sorted_map = OrderedDict(sorted(newResults.items(), reverse=True))
Expand Down