Skip to content

Commit 1fbc4e2

Browse files
author
Devdutt Shenoi
committed
fix: json returned should be {"name": ".."}
1 parent cc297c9 commit 1fbc4e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/handlers/http/logstream.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ use bytes::Bytes;
5050
use chrono::Utc;
5151
use http::{HeaderName, HeaderValue};
5252
use itertools::Itertools;
53-
use serde_json::Value;
53+
use serde_json::{json, Value};
5454
use std::collections::HashMap;
5555
use std::fs;
5656
use std::num::NonZeroU32;
@@ -108,6 +108,7 @@ pub async fn list(req: HttpRequest) -> Result<impl Responder, StreamError> {
108108
Users.authorize(key.clone(), Action::ListStream, Some(logstream), None)
109109
== crate::rbac::Response::Authorized
110110
})
111+
.map(|name| json!({"name": name}))
111112
.collect_vec();
112113

113114
Ok(web::Json(res))

0 commit comments

Comments
 (0)