MCPcopy Create free account
hub / github.com/dwgx/WindsurfAPI / getAccountList

Function getAccountList

src/auth.js:1386–1395  ·  view source on GitHub ↗
({ view = 'full', offset = 0, limit = Infinity, filter = '' } = {})

Source from the content-addressed store, hash-verified

1384}
1385
1386export function getAccountList({ view = 'full', offset = 0, limit = Infinity, filter = '' } = {}) {
1387 const now = Date.now();
1388 let list = accounts;
1389 if (filter === 'flagged') {
1390 list = list.filter(a => a.status === 'error' || (a.errorCount || 0) > 0 || (a.rateLimitedUntil && a.rateLimitedUntil > now));
1391 }
1392 const start = Math.max(0, Number.isFinite(offset) ? offset : 0);
1393 const end = Number.isFinite(limit) ? start + Math.max(0, limit) : undefined;
1394 return list.slice(start, end).map(a => publicAccount(a, now, { view }));
1395}
1396
1397export function getAccountPublic(id, { view = 'full' } = {}) {
1398 const account = accounts.find(a => a.id === id);

Callers 9

rate-limit.test.jsFile · 0.90
snapshotAccountIdsFunction · 0.90
routeFunction · 0.90
handlerFunction · 0.90
getAccountsPayloadFunction · 0.90
handleDashboardApiFunction · 0.90

Calls 1

publicAccountFunction · 0.85

Tested by 1

snapshotAccountIdsFunction · 0.72