Je ne sais pas trop

This commit is contained in:
2025-10-26 23:49:20 +01:00
parent 732b1df516
commit e8dd16b34b
15 changed files with 66 additions and 24 deletions

View File

@@ -134,6 +134,8 @@ pub struct SourceRootContainer {
pub class: String,
/// Nombre d'enfants
pub child_count: Option<String>,
/// Indique si le container est searchable ("1" ou "0")
pub searchable: Option<String>,
}
/// Message d'erreur
@@ -639,6 +641,7 @@ async fn get_source_root(Path(id): Path<String>) -> impl IntoResponse {
title: container.title,
class: container.class,
child_count: container.child_count,
searchable: container.searchable,
};
(StatusCode::OK, Json(root)).into_response()
}

View File

@@ -962,6 +962,7 @@ mod tests {
parent_id: "0".to_string(),
restricted: Some("1".to_string()),
child_count: Some("0".to_string()),
searchable: Some("1".to_string()),
title: "Test Source".to_string(),
class: "object.container".to_string(),
containers: vec![],