Example #1
0
 def public_calls():
     if request.method == 'POST':
         return Farm.create_resource(req_data)
     elif request.method == 'GET' and farm_id:
         return Farm.get_resource(request.args, farm_id)
     elif request.method == 'GET':
         return Farm.get_collection(request.args)
Example #2
0
 def private_calls():
     if request.method == 'PATCH':
         return Farm.update_resource(req_data, farm_id)
     elif request.method == 'DELETE':
         return Farm.deactivate_resource(farm_id)