Skip to content

Commit

Permalink
fix: json returned should be {"name": ".."}
Browse files Browse the repository at this point in the history
  • Loading branch information
de-sh committed Jan 29, 2025
1 parent cc297c9 commit 1fbc4e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/handlers/http/logstream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ use bytes::Bytes;
use chrono::Utc;
use http::{HeaderName, HeaderValue};
use itertools::Itertools;
use serde_json::Value;
use serde_json::{json, Value};
use std::collections::HashMap;
use std::fs;
use std::num::NonZeroU32;
Expand Down Expand Up @@ -108,6 +108,7 @@ pub async fn list(req: HttpRequest) -> Result<impl Responder, StreamError> {
Users.authorize(key.clone(), Action::ListStream, Some(logstream), None)
== crate::rbac::Response::Authorized
})
.map(|name| json!({"name": name}))
.collect_vec();

Ok(web::Json(res))
Expand Down

0 comments on commit 1fbc4e2

Please sign in to comment.