Start working on saving the grazing boundary

This commit is contained in:
Danila Fedorin 2020-05-13 22:05:56 -07:00
parent 630ef001cc
commit 1aa0933aa1
1 changed files with 10 additions and 0 deletions

View File

@ -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/<int:id>/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)