Remove UUID requirement from push notification device registration

- Remove UUID column from devices table entirely
- Update unique index from (owner, uuid) to (owner, token)
- Simplify create action to just create device records
- Add token-based unregister route for API clients
- Consolidate error handling with rescue_from
- Update fixtures to remove uuid references

Devices are now identified by (owner, token) instead of UUID.
This simplifies the client-side registration flow.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Fernando Olivares
2026-01-20 22:44:06 -06:00
committed by Rosa Gutierrez
parent 2121b6dc3d
commit 29d3960a3c
6 changed files with 81 additions and 65 deletions
+3 -1
View File
@@ -45,7 +45,9 @@ module Fizzy
end
namespace :users do
resources :devices, only: [ :index, :create, :destroy ]
resources :devices, only: [ :index, :create, :destroy ] do
delete :destroy, on: :collection, as: :unregister
end
end
end
end