- 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
17 lines
455 B
TypeScript
17 lines
455 B
TypeScript
import { getComplexById } from '@/modules/complex/services/complex.service';
|
|
import type { AppContext } from '@/types/hono';
|
|
|
|
type ComplexIdParams = { id: string };
|
|
|
|
export async function getComplexByIdHandler(c: AppContext) {
|
|
const { id } = c.req.valid('param' as never) as ComplexIdParams;
|
|
|
|
const complex = await getComplexById(id);
|
|
|
|
if (!complex) {
|
|
return c.json({ message: 'Complejo no encontrado.' }, 404);
|
|
}
|
|
|
|
return c.json(complex);
|
|
}
|