pub async fn endpoint(
        contents: EndpointContents,
        session: Session,
    ) -> Result<Response<Body>, ServerError> {
        let conn = session.context.db.lock();
        let mut selected_peer = DatabasePeer::get(&conn, session.peer.id)?;
        selected_peer.update(
            &conn,
            PeerContents {
                endpoint: contents.into(),
                ..selected_peer.contents.clone()
            },
        )?;

        status_response(StatusCode::NO_CONTENT)
    }
/// Force a specific endpoint to be reported by the server.
Force a specific endpoint to be reported by the server.
Force a specific endpoint to be reported by the server .
pub async fn endpoint(
        contents: EndpointContents,
        session: Session,
    ) -> Result<Response<Body>, ServerError> {
        let conn = session.context.db.lock();
        let mut selected_peer = DatabasePeer::get(&conn, session.peer.id)?;
        selected_peer.update(
            &conn,
            PeerContents {
                endpoint: contents.into(),
                ..selected_peer.contents.clone()
            },
        )?;
        status_response(StatusCode::NO_CONTENT)
    }
pub async fn endpoint ( contents : EndpointContents , session : Session , ) -> Result < Response < Body > , ServerError > { let conn = session . context . db . lock ( ) ; let mut selected_peer = DatabasePeer :: get ( & conn , session . peer . id ) ? ; selected_peer . update ( & conn , PeerContents { endpoint : contents . into ( ) , .. selected_peer . contents . clone ( ) } , ) ? ; status_response ( StatusCode :: NO_CONTENT ) }
Force a specific endpoint to be reported by the server.
Force a specific endpoint to be reported by the server .
contents
EndpointContents
session
Session