2be10ce42c
Code (code/): - TypeScript MCP server with 5 tools (business info, hours, services, booking, related) - PostgreSQL schema with pilot business seed data - /.well-known/mcp-server manifest generator - Railway deployment config (Dockerfile, railway.json) - Multi-tenant gateway placeholder GTM (docs/gtm/): - Partner One-Pager: agency sales asset with economics, onboarding, competitive comparison Legal (docs/legal/): - Data Flow & Privacy: data collection, storage, sharing, GDPR/CCPA commitments - Partnership Agreement Skeleton: template for agency/CoC partnerships - IP Notes: well-known convention positioning, telemetry ownership, open-source strategy
15 lines
397 B
TypeScript
15 lines
397 B
TypeScript
import { pool } from '../db/schema.js';
|
|
|
|
export async function getHours(params: { slug: string }): Promise<Record<string, any>> {
|
|
const result = await pool.query(
|
|
`SELECT hours FROM businesses WHERE slug = $1`,
|
|
[params.slug]
|
|
);
|
|
|
|
if (result.rows.length === 0) {
|
|
return { error: `Business '${params.slug}' not found` };
|
|
}
|
|
|
|
return { hours: JSON.parse(result.rows[0].hours) };
|
|
}
|