import { queryOne } from '../../core/db.js';

export async function healthRoute() {
  const db = await queryOne<{ ok: number }>('select 1 as ok');
  return {
    ok: true,
    service: 'tiku-saas-api',
    db: db?.ok === 1 ? 'ok' : 'unknown',
    time: new Date().toISOString(),
  };
}
