prop/lib/microwaveprop_web/live/beacon_live
Graham McIntire 63b2d405b6
Some checks failed
Build and Push / Build and Push Docker Image (push) Failing after 13m23s
fix: decode beacons_json before mutating in patch/remove helpers
patch_beacons_json/2 and remove_from_beacons_json/2 were calling
Enum.reject/2 directly on @beacons_json, which is a JSON-encoded
string from Jason.encode!/0 (not a list). This crashed with
Protocol.UndefinedError when no approved beacons existed (string
was "[]") and a PubSub broadcast triggered an update.

Decode with Jason.decode!/1, operate on the list, then re-encode
with Jason.encode!/1 so the template's data-beacons attribute
remains a valid JSON string for the JS hook.
2026-08-04 17:10:26 -05:00
..
form.ex docs/tests: moduledocs on 18 LiveViews, MapLive event coverage, Rust pipeline roundtrip 2026-04-21 17:16:12 -05:00
index.ex fix: decode beacons_json before mutating in patch/remove helpers 2026-08-04 17:10:26 -05:00
show.ex beacon monitor work 2026-07-22 10:30:21 -05:00