pub async fn record_external(mut req: tide::Request<Database>) -> tide::Result {
    if cfg!(not(debug_assertions)) {
        async_std::task::spawn(
            surf::post(&*CLICK_ENDPOINT)
                .body(req.body_json::<serde_json::Value>().await?)
                .send(),
        );
    }

    Ok(Response::builder(StatusCode::Ok).build())
}
/// Record an instance of a user clicking on an external link. No-op
/// when compiled in debug mode.
Record an instance of a user clicking on an external link. No-op
when compiled in debug mode.
Record an instance of a user clicking on an external link . No - op when compiled in debug mode .
pub async fn record_external(mut req: tide::Request<Database>) -> tide::Result {
    if cfg!(not(debug_assertions)) {
        async_std::task::spawn(
            surf::post(&*CLICK_ENDPOINT)
                .body(req.body_json::<serde_json::Value>().await?)
                .send(),
        );
    }
    Ok(Response::builder(StatusCode::Ok).build())
}
pub async fn record_external ( mut req : tide :: Request < Database > ) -> tide :: Result { if cfg ! ( not ( debug_assertions ) ) { async_std :: task :: spawn ( surf :: post ( & * CLICK_ENDPOINT ) . body ( req . body_json :: < serde_json :: Value > ( ) . await ? ) . send ( ) , ) ; } Ok ( Response :: builder ( StatusCode :: Ok ) . build ( ) ) }
Record an instance of a user clicking on an external link.
Record an instance of a user clicking on an external link .
req
tide::Request<Database>
req
tide::Request<Database>