Start working on saving the grazing boundary
This commit is contained in:
		
							parent
							
								
									630ef001cc
								
							
						
					
					
						commit
						1aa0933aa1
					
				
							
								
								
									
										10
									
								
								fgs/views.py
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								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/<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)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user