[claude] fix get-lnbits-key.sh version detection for pre-0.12 LNbits (#19) #53

Merged
claude merged 1 commits from claude/issue-19 into main 2026-03-23 01:05:20 +00:00

1 Commits

Author SHA1 Message Date
Alexander Whitestone
d560a27629 fix: separate reachability check from version detection in get-lnbits-key.sh
Some checks failed
CI / Typecheck & Lint (pull_request) Failing after 1s
The script used /api/v1/health for both reachability testing and version
detection. Since that endpoint only exists on LNbits 0.12+, old versions
were incorrectly reported as "not reachable" instead of falling through
to the legacy superuser API path.

Now the script:
- Tests reachability via GET / (works on all LNbits versions)
- Uses /api/v1/health only for version detection
- If health endpoint is absent, correctly assumes pre-0.12 (legacy path)
- If health endpoint exists but lacks server_version, assumes 0.12+

Fixes #19

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 21:04:38 -04:00