(searchTerm)
| 14166 | if (button) { |
| 14167 | button.disabled = true; |
| 14168 | button.textContent = 'Scheduling switch...'; |
| 14169 | button.classList.add('opacity-60', 'cursor-not-allowed'); |
| 14170 | } |
| 14171 | |
| 14172 | try { |
| 14173 | const result = await postPwnAPI('/api/pwnagotchi/swap', { target: normalized }); |
| 14174 | if (normalized === 'pwnagotchi') _pwnSwapRequestedThisSession = true; |
| 14175 | const message = (result && result.message) ? result.message : `Switch scheduled to ${formatPwnModeLabel(normalized)}`; |
| 14176 | addConsoleMessage(message, 'info'); |
| 14177 | if (result && result.status) { |
| 14178 | updatePwnagotchiUI(result.status); |
| 14179 | } else { |
| 14180 | refreshPwnagotchiStatus({ silent: true }); |
| 14181 | } |
nothing calls this directly
no test coverage detected