LibreChat/packages/api/src/admin
Dustin Healy e55db4bfb4 fix: defensive rollback in removeRoleMember, type/style cleanup, test coverage
- Wrap removeRoleMember post-write admin rollback in try/catch so a
  transient DB failure cannot leave the system with zero administrators
- Replace double `as unknown[] as IRole[]` cast with `.lean<IRole[]>()`
- Type parsePagination param explicitly; extract DEFAULT/MAX page constants
- Preserve original error cause in updateRoleByName re-throw
- Add test for rollback failure path in removeRoleMember (returns 400)
- Add test for pre-existing roles missing description field (.lean())
2026-03-26 17:55:58 -07:00
..
config.handler.spec.ts 🎛️ feat: DB-Backed Per-Principal Config System (#12354) 2026-03-25 19:39:29 -04:00
config.spec.ts 🎛️ feat: DB-Backed Per-Principal Config System (#12354) 2026-03-25 19:39:29 -04:00
config.ts 🧵 feat: ALS Context Middleware, Tenant Threading, and Config Cache Invalidation (#12407) 2026-03-26 17:35:00 -04:00
groups.spec.ts 👥 feat: Admin Groups API Endpoints (#12387) 2026-03-26 17:36:18 -04:00
groups.ts 👥 feat: Admin Groups API Endpoints (#12387) 2026-03-26 17:36:18 -04:00
index.ts feat: add admin roles handler factory and Express routes 2026-03-26 14:50:27 -07:00
roles.spec.ts fix: defensive rollback in removeRoleMember, type/style cleanup, test coverage 2026-03-26 17:55:58 -07:00
roles.ts fix: defensive rollback in removeRoleMember, type/style cleanup, test coverage 2026-03-26 17:55:58 -07:00