app/controllers/api/logs_controller.rb
def handle_single_log
      outcome = new_log(raw_json)
      if outcome.success?
        outcome.result.save!
        maybe_deliver(outcome.result)
      end
      mutate outcome
    end
# 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 handle_single_log
      outcome = new_log(raw_json)
      if outcome.success?
        outcome.result.save!
        maybe_deliver(outcome.result)
      end
      mutate outcome
    end
def handle_single_log outcome = new_log ( raw_json ) if outcome . success? outcome . result . save! maybe_deliver ( outcome . result ) end mutate outcome end
This is one of the "oddball" endpoints for the FarmBot API.
This is one of the " oddball " endpoints for the FarmBot API .