hive-c0re: drop the bare dashboard routes, /api only (phase 3 of route consolidation)
This commit is contained in:
parent
4db8a8cd3d
commit
95c4854b4c
1 changed files with 4 additions and 37 deletions
|
|
@ -68,23 +68,6 @@ pub async fn serve(port: u16, coord: Arc<Coordinator>) -> Result<()> {
|
|||
// non-static requests here (see hive-gateway.nix). Unmatched paths 404.
|
||||
let app = Router::new()
|
||||
.route("/api/state", get(api_state))
|
||||
.route("/approve/{id}", post(approvals::post_approve))
|
||||
.route("/deny/{id}", post(approvals::post_deny))
|
||||
.route("/destroy/{name}", post(lifecycle_ops::post_destroy))
|
||||
.route("/kill/{name}", post(lifecycle_ops::post_kill))
|
||||
.route("/restart/{name}", post(lifecycle_ops::post_restart))
|
||||
.route("/start/{name}", post(lifecycle_ops::post_start))
|
||||
.route("/rebuild/{name}", post(lifecycle_ops::post_rebuild))
|
||||
.route("/update-all", post(lifecycle_ops::post_update_all))
|
||||
.route(
|
||||
"/answer-question/{id}",
|
||||
post(questions::post_answer_question),
|
||||
)
|
||||
.route(
|
||||
"/cancel-question/{id}",
|
||||
post(questions::post_cancel_question),
|
||||
)
|
||||
.route("/purge-tombstone/{name}", post(post_purge_tombstone))
|
||||
.route("/api/journal/{name}", get(journal::get_journal))
|
||||
.route("/api/journal-host", get(journal::get_journal_host))
|
||||
.route("/api/approval-diff/{id}", get(approvals::get_approval_diff))
|
||||
|
|
@ -93,10 +76,6 @@ pub async fn serve(port: u16, coord: Arc<Coordinator>) -> Result<()> {
|
|||
"/api/matrix-accounts",
|
||||
get(matrix_accounts::get_matrix_accounts),
|
||||
)
|
||||
.route(
|
||||
"/matrix-account-login",
|
||||
post(matrix_accounts::post_matrix_account_login),
|
||||
)
|
||||
.route("/api/reminders", get(reminders::api_reminders))
|
||||
.route("/api/operator-inbox", get(api_operator_inbox))
|
||||
.route("/api/stats-hive", get(api_stats_hive))
|
||||
|
|
@ -120,12 +99,6 @@ pub async fn serve(port: u16, coord: Arc<Coordinator>) -> Result<()> {
|
|||
get(build_logs::get_build_log_raw),
|
||||
)
|
||||
.route("/api/agent/{name}/mark-all-read", post(post_mark_all_read))
|
||||
.route(
|
||||
"/cancel-reminder/{id}",
|
||||
post(reminders::post_cancel_reminder),
|
||||
)
|
||||
.route("/retry-reminder/{id}", post(reminders::post_retry_reminder))
|
||||
.route("/request-spawn", post(post_request_spawn))
|
||||
.route("/api/topology/set-parent", post(topology::post_set_parent))
|
||||
.route(
|
||||
"/api/topology/set-parent-bulk",
|
||||
|
|
@ -142,8 +115,6 @@ pub async fn serve(port: u16, coord: Arc<Coordinator>) -> Result<()> {
|
|||
post(permissions::post_capabilities),
|
||||
)
|
||||
.route("/api/permissions", post(permissions::post_permissions))
|
||||
.route("/op-send", post(post_op_send))
|
||||
.route("/meta-update", post(post_meta_update))
|
||||
.route(
|
||||
"/api/schedules",
|
||||
get(schedules::api_schedules).post(schedules::post_schedule_new),
|
||||
|
|
@ -164,15 +135,11 @@ pub async fn serve(port: u16, coord: Arc<Coordinator>) -> Result<()> {
|
|||
"/api/rebuild-queue/{id}/cancel",
|
||||
post(schedules::post_rebuild_queue_cancel),
|
||||
)
|
||||
.route("/dashboard/stream", get(dashboard_stream))
|
||||
.route("/dashboard/history", get(dashboard_history))
|
||||
.route("/webhook/knowledge", post(webhook::post_webhook_knowledge))
|
||||
// Transitional `/api/`-prefixed aliases for the bare backend
|
||||
// routes above (same handlers). Phase 1 of the route-naming
|
||||
// consolidation: register both paths so the frontend can move to
|
||||
// `/api/...` without a lockstep cutover; the bare paths are
|
||||
// dropped once the frontend has migrated. `/webhook/knowledge`
|
||||
// is forge-driven (not the SPA), so it keeps its own prefix.
|
||||
// Backend routes — the frontend calls these `/api/` paths. The
|
||||
// transitional bare top-level aliases were removed once the
|
||||
// frontend migrated. `/webhook/knowledge` keeps its own prefix
|
||||
// (forge-driven, not the SPA).
|
||||
.route("/api/approve/{id}", post(approvals::post_approve))
|
||||
.route("/api/deny/{id}", post(approvals::post_deny))
|
||||
.route("/api/destroy/{name}", post(lifecycle_ops::post_destroy))
|
||||
|
|
|
|||
Loading…
Reference in a new issue