17 lines · 778 B · TypeScript
RawDownload
// Pre-login check of whether the instance still needs first-run setup (its one// org has zero members). Read by the auth gate to choose the setup vs sign-in// screen. A plain same-origin fetch — the same boundary the /join + setup// screens use, which run before the atom registry exists. Two-arg `then` keeps// it Promise.catch-free; any failure falls back to "no setup needed" (sign-in).export const fetchNeedsSetup = async (): Promise<boolean> => {  const response = await fetch("/api/setup-status", { credentials: "same-origin" }).then(    (r) => r,    () => null,  );  if (!response || !response.ok) return false;  const data = (await response.json().then(    (d) => d,    () => ({}),  )) as { needsSetup?: boolean };  return data.needsSetup === true;};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t