LCOV - code coverage report
Current view: top level - compute_tools/src/http/routes - dbs_and_roles.rs (source / functions) Coverage Total Hit
Test: 07bee600374ccd486c69370d0972d9035964fe68.info Lines: 0.0 % 7 0
Test Date: 2025-02-20 13:11:02 Functions: 0.0 % 2 0

            Line data    Source code
       1              : use std::sync::Arc;
       2              : 
       3              : use axum::{extract::State, response::Response};
       4              : use http::StatusCode;
       5              : 
       6              : use crate::{catalog::get_dbs_and_roles, compute::ComputeNode, http::JsonResponse};
       7              : 
       8              : /// Get the databases and roles from the compute.
       9            0 : pub(in crate::http) async fn get_catalog_objects(
      10            0 :     State(compute): State<Arc<ComputeNode>>,
      11            0 : ) -> Response {
      12            0 :     match get_dbs_and_roles(&compute).await {
      13            0 :         Ok(catalog_objects) => JsonResponse::success(StatusCode::OK, catalog_objects),
      14            0 :         Err(e) => JsonResponse::error(StatusCode::INTERNAL_SERVER_ERROR, e),
      15              :     }
      16            0 : }
        

Generated by: LCOV version 2.1-beta