Add types to date preview & vod api (#13636)

* Add types to date preview api

* Formatting
This commit is contained in:
Nicolas Mowen
2024-09-09 11:03:53 -05:00
committed by GitHub
parent f143fceceb
commit f5dbcd5465
2 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -75,7 +75,10 @@ def preview_ts(camera_name, start_ts, end_ts):
return make_response(jsonify(clips), 200)
@PreviewBp.route("/preview/<year_month>/<day>/<hour>/<camera_name>/<tz_name>")
@PreviewBp.route("/preview/<year_month>/<int:day>/<int:hour>/<camera_name>/<tz_name>")
@PreviewBp.route(
"/preview/<year_month>/<float:day>/<float:hour>/<camera_name>/<tz_name>"
)
def preview_hour(year_month, day, hour, camera_name, tz_name):
parts = year_month.split("-")
start_date = (