pub async fn subscriptions(user_id: i64) -> Result<Vec<String>, sqlx::Error> {
    let pool = pg_pool().await;

    let subscriptions = sqlx::query("SELECT account FROM subscriptions WHERE user_id = $1")
        .bind(user_id)
        .map(|row: PgRow| row.get::<&[u8], _>(0).to_base58check(1))
        .fetch_all(pool)
        .await?;

    Ok(subscriptions)
}
/// Returns subscriptions for a Telegram user.
Returns subscriptions for a Telegram user.
Returns subscriptions for a Telegram user .
pub async fn subscriptions(user_id: i64) -> Result<Vec<String>, sqlx::Error> {
    let pool = pg_pool().await;
    let subscriptions = sqlx::query("SELECT account FROM subscriptions WHERE user_id = $1")
        .bind(user_id)
        .map(|row: PgRow| row.get::<&[u8], _>(0).to_base58check(1))
        .fetch_all(pool)
        .await?;
    Ok(subscriptions)
}
pub async fn subscriptions ( user_id : i64 ) -> Result < Vec < String > , sqlx :: Error > { let pool = pg_pool ( ) . await ; let subscriptions = sqlx :: query ( " " ) . bind ( user_id ) . map ( | row : PgRow | row . get :: < & [ u8 ] , _ > ( 0 ) . to_base58check ( 1 ) ) . fetch_all ( pool ) . await ? ; Ok ( subscriptions ) }
Returns subscriptions for a Telegram user.
Returns subscriptions for a Telegram user .
user_id
i64
user_id
i64