2015-03-09 04:49:42 -06:00
|
|
|
class DeviceSerializer < ActiveModel::Serializer
|
2017-10-03 09:03:06 -06:00
|
|
|
attributes :id, :name, :webcam_url, :timezone, :last_saw_api, :last_saw_mq,
|
|
|
|
:last_seen
|
|
|
|
|
|
|
|
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
|