Compare commits
3 Commits
7a991f697a
...
4448de1288
Author | SHA1 | Date |
---|---|---|
Danila Fedorin | 4448de1288 | |
Danila Fedorin | 910bb5d5bf | |
Danila Fedorin | a57f8170e7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
fgs/__init__.pyc
BIN
fgs/__init__.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -72,3 +72,11 @@ def collar_history(id):
|
|||
order_by(DataPoint.datetime.desc()).\
|
||||
all()
|
||||
return jsonify([point.to_dict() for point in data_points])
|
||||
|
||||
@app.route('/collars/<int:id>/details')
|
||||
@jwt_required
|
||||
def collar_detail(id):
|
||||
collar = Collar.query.filter_by(id=id).first()
|
||||
if collar is None: abort(404)
|
||||
|
||||
return jsonify({'id': collar.id, 'name': collar.name })
|
||||
|
|
Loading…
Reference in New Issue