From 1aa0933aa13e224a2d01f7c0b9641e41c8ef1645 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Wed, 13 May 2020 22:05:56 -0700 Subject: [PATCH] Start working on saving the grazing boundary --- fgs/views.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fgs/views.py b/fgs/views.py index 6025f61..5d7f1f0 100644 --- a/fgs/views.py +++ b/fgs/views.py @@ -90,3 +90,13 @@ def collar_detail(id): n_stimulus = stimulus_points.count() return jsonify({'id': collar.id, 'name': collar.name, 'stimulus': n_stimulus }) + +@app.route('/collars//boundary/set', methods=['POST']) +@jwt_required +def collar_set_boundary(id): + collar = Collar.query.filter_by(id=id).first() + if collar is None: abort(404) + + print(request.json) + abort(500) +