Files
playzer/apps/backend/src/modules/complex/handlers/get-complex-by-slug.handler.ts
Jose Selesan 9ee98a4cb4 feat: add city/state/country to complex, new settings page with sidebar, and Biome linting
- Added city, state, and country optional fields to Complex model
- Updated onboarding to include optional location fields
- Created new settings page with sidebar navigation (Datos del Complejo, Canchas)
- Replaced ESLint with Biome for frontend and backend linting
- Added parallel dev script with concurrently
- Migrated register-routes to use direct app.route() pattern
2026-04-10 15:36:15 -03:00

17 lines
471 B
TypeScript

import { getComplexBySlug } from '@/modules/complex/services/complex.service';
import type { AppContext } from '@/types/hono';
type ComplexSlugParams = { slug: string };
export async function getComplexBySlugHandler(c: AppContext) {
const { slug } = c.req.valid('param' as never) as ComplexSlugParams;
const complex = await getComplexBySlug(slug);
if (!complex) {
return c.json({ message: 'Complejo no encontrado.' }, 404);
}
return c.json(complex);
}