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

Function loadVisibleSourcesForMove

public/js/folderManager.js:270–286  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

268}
269
270async function loadVisibleSourcesForMove() {
271 if (__moveFolderSourcesCache) return __moveFolderSourcesCache;
272 try {
273 const res = await fetch(withBase('/api/pro/sources/visible.php'), {
274 credentials: 'include',
275 headers: { 'Accept': 'application/json' }
276 });
277 if (!res.ok) return null;
278 const data = await res.json().catch(() => null);
279 if (!data || data.ok !== true || !data.enabled) return null;
280 const list = Array.isArray(data.sources) ? data.sources : [];
281 __moveFolderSourcesCache = list;
282 return list;
283 } catch (e) {
284 return null;
285 }
286}
287
288function populateMoveSourceSelect(selectEl, sources, activeId) {
289 if (!selectEl) return;

Callers 1

Calls 1

withBaseFunction · 0.85

Tested by

no test coverage detected