// server/api/config/klinik-ruang.get.ts
import { getConfigDb, parseConfigRow } from '~/server/utils/configDb';

export default defineEventHandler(() => {
  const db = getConfigDb();
  const rows = db.prepare('SELECT * FROM config_klinik_ruang ORDER BY id ASC').all();
  return { success: true, data: rows.map(parseConfigRow) };
});
