Skip to content

Commit

Permalink
show mac_address on devices when not null, ensure hardware_name_overr…
Browse files Browse the repository at this point in the history
…ide is updatable
  • Loading branch information
timcowlishaw committed Feb 28, 2024
1 parent 8e49e7b commit fa8394d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/v0/devices_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def device_params
params_to_permit = [
:name,
:description,
:hardware_name_override,
:mac_address,
:latitude,
:longitude,
Expand Down
1 change: 1 addition & 0 deletions app/views/v0/devices/_device.jbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ authorized = !local_assigns[:never_authorized] && current_user && (current_user.

if authorized
json.merge! device_token: device.device_token
json.merge! mac_address: device.mac_address if device.mac_address
else
json.merge! device_token: '[FILTERED]'
end
Expand Down

0 comments on commit fa8394d

Please sign in to comment.