(path)
| 18 | } |
| 19 | |
| 20 | async function fetchJson(path) { |
| 21 | const response = await fetch(endpoint(path), { cache: "no-store" }); |
| 22 | if (!response.ok) { |
| 23 | throw new Error( |
| 24 | `${path} returned ${response.status}: ${await response.text()}`, |
| 25 | ); |
| 26 | } |
| 27 | return response.json(); |
| 28 | } |
| 29 | |
| 30 | function streamKey(stream) { |
| 31 | return `${stream.clientId ?? "unknown"}:${stream.kind ?? "unknown"}`; |
no test coverage detected