mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
With the switches now enforced at dispatch, a user could still flip a channel on, see the toggle stick, and get nothing. Refuse the enable instead, with 403 and a message that names the reason: the ntfy and Telegram config endpoints on both accepted body shapes, and the Web Push subscribe endpoint, which is the enable step for that channel because it creates the channel row. Telegram is checked before the webhook registration, so a refused enable makes no outbound call and stores nothing. Disabling a channel keeps working while the switch is off — a user must always be able to turn a channel off, whatever the operator has done. The three refusals are published in the contract; `/api/settings/global-services` already exposes the switches so a client can hide the control instead of provoking the refusal.
2.3 MiB
2.3 MiB