import { pool } from '../db/schema.js'; export async function getServices(params: { slug: string }): Promise> { const result = await pool.query( `SELECT services FROM businesses WHERE slug = $1`, [params.slug] ); if (result.rows.length === 0) { return { error: `Business '${params.slug}' not found` }; } return { services: JSON.parse(result.rows[0].services) }; }