mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
[f8480831] Batch B: extract route helpers in remaining smaller-offender route files (#760)
* [f8480831] refactor(api): extract route-layer helpers into services/schemas/utils (batch B) Moves 28 non-@router-decorated helper functions out of 15 route files (optimal, project, release, dashboard, pitch, x, docs, git, playbooks, product, provider, research, secretary, system, work_session) into their paired services module (DB/service-calling helpers), the route's schemas module as a converter (pure response/request shaping, mirroring the existing project_to_response/assignment_to_response pattern), or roboco/utils/converters.py (pure generic helpers). Adds two small shared role-check helpers to api/deps.py (require_auditor_or_ceo, require_role_in) for endpoint-specific role gates that had no existing home. Placement-only: no route paths, schemas, or observable behavior changed. Fixes the handful of tests that imported the old private helper names directly. * [f8480831] docs(map): document Batch B route-helper relocation in api-routes-schemas.md * [f8480831] docs(map): add Key Symbols rows for require_auditor_or_ceo/require_role_in --------- Co-authored-by: Backend Developer 2 <be-dev-2@roboco.tech> Co-authored-by: Backend Documenter <be-doc@roboco.tech>
This commit is contained in:
co-authored by
Backend Developer 2
Backend Documenter
parent
109b4d4d82
commit
7804e0fafa
@@ -1,7 +1,7 @@
|
||||
"""Dashboard auditor flag/report mutating routes (``create_auditor_flag``,
|
||||
``resolve_auditor_flag``, ``create_auditor_report``, ``send_auditor_report``)
|
||||
are gated to AUDITOR or CEO via a ``CurrentAgentContext`` dependency plus a
|
||||
coarse role gate, mirroring ``roboco/api/routes/playbooks.py::_require_curator``.
|
||||
are gated to AUDITOR or CEO via a ``CurrentAgentContext`` dependency plus
|
||||
``roboco.api.deps.require_auditor_or_ceo`` — the same check playbooks.py uses.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
Reference in New Issue
Block a user