app/controllers/api/abstract_controller.rb
# Devices have a `last_saw_api` field to assist users with debugging.
# We update this column every time an FBOS device talks to the API.
Devices have a `last_saw_api` field to assist users with debugging.
We update this column every time an FBOS device talks to the API.
Devices have a ` last_saw_api ` field to assist users with debugging . We update this column every time an FBOS device talks to the API .
def mark_as_seen(bot = (current_user && current_user.device))
      when_farmbot_os do
        if bot
          v = fbos_version
          bot.last_saw_api = Time.now
          if v > NULL && v < NOT_FBOS
            bot.fbos_version = (v.to_s || "").first(14)
            bot.save!
          end
        end
      end
    end
def mark_as_seen ( bot = ( current_user && current_user . device ) ) when_farmbot_os do if bot v = fbos_version bot . last_saw_api = Time . now if v > NULL && v < NOT_FBOS bot . fbos_version = ( v . to_s || "" ) . first ( 14 ) bot . save! end end end end
Devices have a `last_saw_api` field to assist users with debugging.
Devices have a ` last_saw_api ` field to assist users with debugging .
# Do _not_ set the FBOS version to 0.0.0 if the UA header is missing.
bot
current_user
device