dashboard: /op-send returns 200; client relies on SSE for visual update
This commit is contained in:
parent
a478792914
commit
616ca38199
2 changed files with 12 additions and 5 deletions
|
|
@ -1141,7 +1141,13 @@ async fn post_op_send(State(state): State<AppState>, Form(form): Form<OpSendForm
|
|||
}) {
|
||||
return error_response(&format!("op-send to {to} failed: {e:#}"));
|
||||
}
|
||||
Redirect::to("/").into_response()
|
||||
// 200 instead of 303 → the client doesn't refetch /api/state. The
|
||||
// broker `send` already emitted a `MessageEvent` which the
|
||||
// dashboard channel forwarder mirrors as `DashboardEvent::Sent`,
|
||||
// and the page's terminal + inbox derive from that stream — so the
|
||||
// operator's send shows up the same way an agent's send does, with
|
||||
// no full-state refresh in between.
|
||||
(axum::http::StatusCode::OK, "ok").into_response()
|
||||
}
|
||||
|
||||
async fn post_request_spawn(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue