added custom url label and is protected fields to catalog listing
This commit is contained in:
@@ -125,9 +125,11 @@ impl HttpServer {
|
||||
#[derive(Serialize)]
|
||||
struct StreamListing {
|
||||
label: String,
|
||||
custom_url_label: String,
|
||||
id: i32,
|
||||
user: String,
|
||||
started_at: DateTime<Utc>, //UNIX TIMESTAMP
|
||||
started_at: DateTime<Utc>,
|
||||
is_password_protected: bool,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
@@ -252,8 +254,10 @@ async fn catalog_handler(
|
||||
.map(|x| StreamListing {
|
||||
id: x.stream_key_id,
|
||||
label: x.stream_key_label.clone(),
|
||||
custom_url_label: x.custom_id.clone().unwrap_or_default(),
|
||||
user: x.stream_key_user.clone(),
|
||||
started_at: x.started_at,
|
||||
is_password_protected: x.password.is_some(),
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
Ok(Json(catalog))
|
||||
|
||||
Reference in New Issue
Block a user