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

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