aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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())