Skip to content

Commit 863ee9f

Browse files
author
ExpDev07
committed
Add "last_updated" to response + some cleanup
1 parent 63fe78a commit 863ee9f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/data/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import requests
22
import csv
3+
from datetime import datetime
34
from cachetools import cached, TTLCache
4-
from app.utils import date as date_util
5-
from app.utils import countrycodes
5+
from app.utils import countrycodes, date as date_util
66

77
"""
88
Base URL for fetching data.
@@ -65,5 +65,6 @@ def get_data(category):
6565
return {
6666
'locations': locations,
6767
'latest': latest,
68+
'last_updated': datetime.utcnow().isoformat() + 'Z',
6869
'source': 'https://github.com/ExpDev07/coronavirus-tracker-api',
6970
}

0 commit comments

Comments
 (0)