MCPcopy Index your code
hub / github.com/Dispatcharr/Dispatcharr / getChannelsInRange

Method getChannelsInRange

frontend/src/api.js:295–311  ·  view source on GitHub ↗
(start, end, { signal } = {})

Source from the content-addressed store, hash-verified

293 // Pass `signal` from an AbortController on per-keystroke calls so an
294 // out-of-order response cannot overwrite newer state.
295 static async getChannelsInRange(start, end, { signal } = {}) {
296 try {
297 const params = new URLSearchParams({ start: String(start) });
298 if (end !== undefined && end !== null && end !== '') {
299 params.set('end', String(end));
300 }
301 const url = `${host}/api/channels/channels/numbers-in-range/?${params.toString()}`;
302 return await request(url, { signal });
303 } catch (e) {
304 if (e?.name === 'AbortError') {
305 throw e;
306 }
307 // Silent failure is correct here: the warning is purely advisory and
308 // should not block the user from saving when the server is flaky.
309 return { occupants: [] };
310 }
311 }
312
313 // Server-side regex preview for a group's streams. Returns find_matches,
314 // filter_matches, and exclude_matches plus accurate counts across the

Callers 1

getChannelsInRangeFunction · 0.80

Calls 2

requestFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected