pub async fn list(session: Session) -> Result<Response<Body>, ServerError> {
        let conn = session.context.db.lock();
        let mut peers = DatabasePeer::list(&conn)?
            .into_iter()
            .map(|peer| peer.inner)
            .collect::<Vec<_>>();
        inject_endpoints(&session, &mut peers);
        json_response(&peers)
    }
/// List all peers, including disabled ones. This is an admin-only endpoint.
List all peers, including disabled ones. This is an admin-only endpoint.
List all peers including disabled ones . This is an admin - only endpoint .
pub async fn list(session: Session) -> Result<Response<Body>, ServerError> {
        let conn = session.context.db.lock();
        let mut peers = DatabasePeer::list(&conn)?
            .into_iter()
            .map(|peer| peer.inner)
            .collect::<Vec<_>>();
        inject_endpoints(&session, &mut peers);
        json_response(&peers)
    }
pub async fn list ( session : Session ) -> Result < Response < Body > , ServerError > { let conn = session . context . db . lock ( ) ; let mut peers = DatabasePeer :: list ( & conn ) ? . into_iter ( ) . map ( | peer | peer . inner ) . collect :: < Vec < _ > > ( ) ; inject_endpoints ( & session , & mut peers ) ; json_response ( & peers ) }
List all peers, including disabled ones.
List all peers including disabled ones .
session
Session