mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-10-15 20:07:23 +02:00
Add types to date preview & vod api (#13636)
* Add types to date preview api * Formatting
This commit is contained in:
parent
f143fceceb
commit
f5dbcd5465
@ -597,7 +597,8 @@ def vod_ts(camera_name, start_ts, end_ts):
|
||||
)
|
||||
|
||||
|
||||
@MediaBp.route("/vod/<year_month>/<day>/<hour>/<camera_name>")
|
||||
@MediaBp.route("/vod/<year_month>/<int:day>/<int:hour>/<camera_name>")
|
||||
@MediaBp.route("/vod/<year_month>/<float:day>/<float:hour>/<camera_name>")
|
||||
def vod_hour_no_timezone(year_month, day, hour, camera_name):
|
||||
return vod_hour(
|
||||
year_month, day, hour, camera_name, get_localzone_name().replace("/", ",")
|
||||
|
@ -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 = (
|
||||
|
Loading…
Reference in New Issue
Block a user