()
| 13705 | params.set('cursor', pwnLogCursor.toString()); |
| 13706 | } else { |
| 13707 | params.set('tail', '8192'); |
| 13708 | } |
| 13709 | |
| 13710 | const result = await fetchAPI(`/api/pwnagotchi/logs?${params.toString()}`); |
| 13711 | |
| 13712 | if (!result || result.success === false) { |
| 13713 | if (!options.silent) { |
| 13714 | setPwnLogEmptyMessage((result && result.error) ? result.error : 'Installer log not available yet'); |
| 13715 | } |
| 13716 | if (!result || !result.installing) { |
| 13717 | schedulePwnLogStop(); |
| 13718 | } |
| 13719 | return; |
| 13720 | } |
| 13721 | |
| 13722 | if (typeof result.cursor === 'number') { |
| 13723 | pwnLogCursor = result.cursor; |
| 13724 | } |
| 13725 | |
| 13726 | if (result.file && result.file !== pwnLogActiveFile) { |
| 13727 | pwnLogActiveFile = result.file; |
no test coverage detected