MCPcopy Create free account
hub / github.com/error311/FileRise / loadVisibleSourcesFromApi

Function loadVisibleSourcesFromApi

public/js/sourceManager.js:218–231  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216} catch (e) { /* ignore */ }
217
218async function loadVisibleSourcesFromApi() {
219 try {
220 const res = await fetch(withBase('/api/pro/sources/visible.php'), {
221 credentials: 'include',
222 headers: { 'Accept': 'application/json' },
223 });
224 if (!res.ok) return null;
225 const data = await res.json().catch(() => null);
226 if (!data || data.ok !== true) return null;
227 return data;
228 } catch (e) {
229 return null;
230 }
231}
232
233export async function initSourceSelector(opts = {}) {
234 const wrap = document.getElementById('sourceSelectorWrap');

Callers 1

initSourceSelectorFunction · 0.85

Calls 1

withBaseFunction · 0.85

Tested by

no test coverage detected