mirror of
https://github.com/hanzoai/chat.git
synced 2026-09-30 20:51:17 +00:00
New conversations resolve smart routing from the org's server-driven defaults (GET /v1/chat/routing-defaults proxying cloud's /v1/get-routing-defaults on-behalf-of) with the local toggle as a nullable user override (null = follow org default). Fail-soft: an older cloud-api (404), network error, or non-ok wrapper behaves exactly as today (local preference only). When auto_routing_active is false the toggle is locked with honest copy. Effective state is one pure function, resolveSmartRouting (client/src/utils/endpoints.ts), unit-tested in endpoints.spec.ts. Co-authored-by: Hanzo Dev <[email protected]>
9 lines
257 B
JavaScript
9 lines
257 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const controller = require('../controllers/RoutingDefaults');
|
|
const { requireJwtAuth } = require('../middleware/');
|
|
|
|
router.get('/', requireJwtAuth, controller);
|
|
|
|
module.exports = router;
|