From 107e5b0e0c3d65124a51c679a76993f3f9a9c769 Mon Sep 17 00:00:00 2001 From: Tim Cowlishaw Date: Mon, 18 Sep 2023 16:35:42 +0200 Subject: [PATCH] remove more spurious or duplicated timestamp fields --- app/controllers/v0/devices_controller.rb | 1 - app/models/device.rb | 1 - app/views/v0/users/_user.jbuilder | 1 - 3 files changed, 3 deletions(-) diff --git a/app/controllers/v0/devices_controller.rb b/app/controllers/v0/devices_controller.rb index b10e9826..02d0818a 100644 --- a/app/controllers/v0/devices_controller.rb +++ b/app/controllers/v0/devices_controller.rb @@ -90,7 +90,6 @@ def fresh_world_map state: device.state, system_tags: device.system_tags, user_tags: device.user_tags, - added_at: device.created_at, updated_at: device.updated_at, last_reading_at: (device.last_reading_at.present? ? device.last_reading_at : nil) } diff --git a/app/models/device.rb b/app/models/device.rb index b9eb8db5..9c94c09a 100644 --- a/app/models/device.rb +++ b/app/models/device.rb @@ -211,7 +211,6 @@ def self.for_world_map state: device.state, system_tags: device.system_tags, user_tags: device.user_tags, - added_at: device.created_at, updated_at: device.updated_at, last_reading_at: (device.last_reading_at.present? ? device.last_reading_at : nil) } diff --git a/app/views/v0/users/_user.jbuilder b/app/views/v0/users/_user.jbuilder index bc4fbe5a..e9eef879 100644 --- a/app/views/v0/users/_user.jbuilder +++ b/app/views/v0/users/_user.jbuilder @@ -49,6 +49,5 @@ json.devices user.devices do |device| json.state device.state json.system_tags device.system_tags json.last_reading_at device.last_reading_at - json.added_at device.created_at.utc.iso8601 json.updated_at device.updated_at.utc.iso8601 end