const orgsRoutes = new Hono<AuthedContext>()
.post('/', zValidator('json', createOrgFormSchema), async (c) => {
// create org logic
return c.json({ organizationId: newOrg.id }, 201);
})
.use('/:orgId/*', middleware)
.get('/:orgId', async (c) => {
// ...
})
const orgsRoutes = new Hono<AuthedContext>()
.post('/', zValidator('json', createOrgFormSchema), async (c) => {
// create org logic
return c.json({ organizationId: newOrg.id }, 201);
})
.use('/:orgId/*', middleware)
.get('/:orgId', async (c) => {
// ...
})