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
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
import type { CreateAdminBookingInput } from '@repo/api-contract'
|
||||
import {
|
||||
AdminBookingServiceError,
|
||||
createAdminBooking,
|
||||
} from '@/modules/admin-booking/services/admin-booking.service'
|
||||
import type { AppContext } from '@/types/hono'
|
||||
} from '@/modules/admin-booking/services/admin-booking.service';
|
||||
import type { AppContext } from '@/types/hono';
|
||||
import type { CreateAdminBookingInput } from '@repo/api-contract';
|
||||
|
||||
type ComplexIdParams = { complexId: string }
|
||||
type ComplexIdParams = { complexId: string };
|
||||
|
||||
export async function createAdminBookingHandler(c: AppContext) {
|
||||
const { complexId } = c.req.valid('param' as never) as ComplexIdParams
|
||||
const payload = c.req.valid('json' as never) as CreateAdminBookingInput
|
||||
const appUserId = c.get('appUserId')
|
||||
const { complexId } = c.req.valid('param' as never) as ComplexIdParams;
|
||||
const payload = c.req.valid('json' as never) as CreateAdminBookingInput;
|
||||
const appUserId = c.get('appUserId');
|
||||
|
||||
try {
|
||||
const booking = await createAdminBooking(appUserId, complexId, payload)
|
||||
return c.json(booking, 201)
|
||||
const booking = await createAdminBooking(appUserId, complexId, payload);
|
||||
return c.json(booking, 201);
|
||||
} catch (error) {
|
||||
if (error instanceof AdminBookingServiceError) {
|
||||
return c.json({ message: error.message }, error.status)
|
||||
return c.json({ message: error.message }, error.status);
|
||||
}
|
||||
throw error
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user