aboutsummaryrefslogtreecommitdiff
path: root/poller
diff options
context:
space:
mode:
authorGalen Guyer <galen@galenguyer.com>2021-02-25 22:46:14 -0500
committerGalen Guyer <galen@galenguyer.com>2021-02-25 22:46:14 -0500
commit79f606ccb9a190d9efde490c1c4a3121815544fe (patch)
treeb540a68e1ea4d323493616d678d46effcda7cc97 /poller
parent52acb063dd83c7856d5c8d2be9618ea2000d4470 (diff)
Add latest route
Diffstat (limited to 'poller')
-rw-r--r--poller/routes.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/poller/routes.py b/poller/routes.py
index 4c0010b..6911fdd 100644
--- a/poller/routes.py
+++ b/poller/routes.py
@@ -5,3 +5,7 @@ from .models import Day
@APP.route('/api/v0/history')
def _get_api_v0_history():
return jsonify([day.serialize() for day in Day.get_all()])
+
+@APP.route('/api/v0/latest')
+def _get_api_v0_latest():
+ return jsonify(Day.get_all()[-1].serialize())