feat(#2302): migrate dashboard to the single hive-host-sock Ident newtype
This commit is contained in:
parent
384dcae5f4
commit
1286029947
10 changed files with 37 additions and 210 deletions
|
|
@ -18,7 +18,7 @@ use serde::{Deserialize, Serialize};
|
|||
use tokio_stream::Stream;
|
||||
use tokio_stream::wrappers::ReceiverStream;
|
||||
|
||||
use super::{AppState, error_response, idents::AgentName};
|
||||
use super::{AppState, Ident, error_response};
|
||||
|
||||
#[derive(Deserialize)]
|
||||
pub(super) struct BuildLogsAllQuery {
|
||||
|
|
@ -58,7 +58,7 @@ pub(super) async fn get_build_logs_agent(
|
|||
AxumPath(name): AxumPath<String>,
|
||||
axum::extract::Query(q): axum::extract::Query<BuildLogsQuery>,
|
||||
) -> Response {
|
||||
let name = match AgentName::parse(&name) {
|
||||
let name = match Ident::parse(&name) {
|
||||
Ok(n) => n,
|
||||
Err(reason) => {
|
||||
return (StatusCode::BAD_REQUEST, format!("bad agent name: {reason}")).into_response();
|
||||
|
|
|
|||
Loading…
Reference in a new issue