Documentation
¶
Overview ¶
Command devicefix registers a paired phone's push endpoint for the browser suite (e2e/tests/push.spec.ts), as PUT /api/device/push does once its test push is accepted:
DATABASE_URL=…_e2e go run ./e2e/devicefix push <device-id> <endpoint>
⚠ WHY NOT THE ROUTE ITSELF: PUT /api/device/push keeps a registration only after muster has sent the endpoint a VAPID test push and got a 2xx, and the endpoint must be an https URL on the default port of an allowed push host. The e2e harness has no such service, so this command makes the SAME store write the route makes after its probe (push.PGStore.ClaimNative, owner and device from the device row). The route, probe included, is internal/api's TestTheDeviceListNoticesAPhonesPushRegistration.
🔴 IT REFUSES ANY DATABASE WHOSE NAME DOES NOT END IN "_e2e" (e2edb.Check).