2015-03-09 04:49:42 -06:00
|
|
|
class DeviceSerializer < ActiveModel::Serializer
|
2018-02-15 14:43:08 -07:00
|
|
|
attributes :id, :name, :timezone, :last_saw_api, :last_saw_mq, :last_seen,
|
|
|
|
:tz_offset_hrs, :fbos_version
|
2017-10-03 09:03:06 -06:00
|
|
|
|
|
|
|
def last_seen
|
|
|
|
# TODO: Remove this by December 2017.
|
|
|
|
# This is a legacy attribute that needs to go away, but will cause
|
|
|
|
# crashes on legacy versions of FBOS.
|
|
|
|
object.last_saw_api
|
|
|
|
end
|
2015-03-09 04:49:42 -06:00
|
|
|
end
|