Explorar o código

add service to get by id

Blake Blackshear %!s(int64=4) %!d(string=hai) anos
pai
achega
8bed4e9970
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      frigate/http.py

+ 4 - 0
frigate/http.py

@@ -63,6 +63,10 @@ def events_summary():
 
     return jsonify([e for e in groups.dicts()])
 
+@bp.route('/events/<id>')
+def event(id):
+    return model_to_dict(Event.get(Event.id == id))
+
 @bp.route('/events')
 def events():
     limit = request.args.get('limit', 100)