Split server/index.js into one file per area
Build and Push Docker Image / build-and-push (push) Successful in 5m37s

Routes move to server/routes/ (auth, account, projects, reader, sharing, admin);
index.js keeps setup only. A smoke test walks 90 API calls against the real
server and compares every status with the pre-split behaviour.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 5.5 committed 2026-10-06 13:25:52 -04:00
1 parent 31ac6b9179
commit 9893883b19
12 files changed
+1337 -1040

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import { isAdminEmail } from './auth.js';
import { votdAvailable } from './votd.js';
import { listPasskeys } from './db.js';
// Shape returned to the client for the signed-in user (login, MFA verify, /auth/me).
export function userPayload(user) {
return {
id: user.id, email: user.email, totpEnabled: user.totpEnabled, podcastName: user.podcastName ?? null,
isAdmin: isAdminEmail(user.email),
reminderEnabled: user.reminderEnabled, ntfyUrl: user.ntfyUrl ?? null, ntfyTopic: user.ntfyTopic ?? null,
reminderTime: user.reminderTime ?? null,
votdEnabled: !!user.votdEnabled, votdTime: user.votdTime ?? null, votdAvailable: votdAvailable(),
prayerEnabled: !!user.prayerEnabled, prayerTime: user.prayerTime ?? null,
loginAlerts: !!user.loginAlerts, passkeyCount: listPasskeys(user.id).length,
};
}