const app = new Hono<{ Variables: { session: Session | null }}>() .use(authMiddleware) .get( '/:slug/available', zValidator( 'param', z.object({ slug: z.string(), }), ), async (c) => { const session = c.get('session') const user = session?.user if (!user) return c.body(null, 401) const { slug } = c.req.valid('param') const useCase = makeOrgExistsBySlugUseCase() const { exists } = await useCase.execute({ slug }) return c.json({ available: !exists }, 200) }, )export default app
MergeSchemaPath<{ "/:slug/available": { $get: { input: { param: { ...; }; }; output: {}; outputFormat: string; status: StatusCode; }; };}, "/organizations">, "/">