refactored Authentication

This commit is contained in:
2026-02-17 16:51:47 +00:00
parent 13e8866875
commit d32d0f5c03
45 changed files with 1322 additions and 66 deletions
@@ -0,0 +1,10 @@
import { createRouter } from '../../create-router';
import { officerdb, count, Users } from 'officerdb';
export const landingPageDataRouter = createRouter();
landingPageDataRouter.get('/', async (ctx) => {
const result = await officerdb.select({ count: count() }).from(Users);
const userCount = result[0]?.count ?? 0;
return ctx.json({ registrationOpen: userCount === 0 });
});