import { createRouter } from '../../create-router';
import { getUserCount } from 'officerdb';

export const landingPageDataRouter = createRouter();

landingPageDataRouter.get('/', async (ctx) => {
  const userCount = await getUserCount();
  return ctx.json({ registrationOpen: userCount === 0 });
});
