app/controllers/api/logs_controller.rb
# This is one of the "oddball" endpoints for the FarmBot API.
# It is unique because it allows batch creation of logs.
# When creating in batches, it is a "best effort" approach.
# If some logs fail to save, they will fail silently.
# As a matter of policy, not all log types are stored in the DB.
This is one of the "oddball" endpoints for the FarmBot API.
It is unique because it allows batch creation of logs.
When creating in batches, it is a "best effort" approach.
If some logs fail to save, they will fail silently.
As a matter of policy, not all log types are stored in the DB.
This is one of the " oddball " endpoints for the FarmBot API . It is unique because it allows batch creation of logs . When creating in batches it is a " best effort " approach . If some logs fail to save they will fail silently . As a matter of policy not all log types are stored in the DB .
def create
      case raw_json
      when Array then handle_many_logs
      when Hash  then handle_single_log
      else; sorry "Post a JSON array or object.", 422
      end
    end
def create case raw_json when Array then handle_many_logs when Hash then handle_single_log else ; sorry "Post a JSON array or object." , 422 end end
This is one of the "oddball" endpoints for the FarmBot API.
This is one of the " oddball " endpoints for the FarmBot API .