Files
chat/api/server/routes/routingDefaults.js
8bffef3029 feat(routing): honor server-driven auto-routing defaults from admin (#65)
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]>
2026-07-07 18:40:42 -07:00

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;