pub async fn poll_vote_exists(pool: &DBPool, user_id: i32, poll_id: i32) -> Result<bool> {
        let res = generic_service_err!(
            sqlx::query_file_as!(PollVote, "sql/poll_vote/get_poll_vote.sql", user_id, poll_id)
            .fetch_all(pool).await,
            "Failed to check if poll vote exists");

        Ok(res.len() == 1)
    }
/// Returns whether or not a user has voted on a poll
/// 
/// # Arguments
/// 
/// * `pool` - The database pool
/// * `user_id` - The ID of the user
/// * `poll_id` - The ID of the poll
Returns whether or not a user has voted on a poll
Returns whether or not a user has voted on a poll
pub async fn poll_vote_exists(pool: &DBPool, user_id: i32, poll_id: i32) -> Result<bool> {
        let res = generic_service_err!(
            sqlx::query_file_as!(PollVote, "sql/poll_vote/get_poll_vote.sql", user_id, poll_id)
            .fetch_all(pool).await,
            "Failed to check if poll vote exists");
        Ok(res.len() == 1)
    }
pub async fn poll_vote_exists ( pool : & DBPool , user_id : i32 , poll_id : i32 ) -> Result < bool > { let res = generic_service_err ! ( sqlx query_file_as ( PollVote " " user_id poll_id ) fetch_all ( pool ) await " " ) ; Ok ( res . len ( ) == 1 ) }
Returns whether or not a user has voted on a poll
Returns whether or not a user has voted on a poll
pool
&DBPool
user_id
i32
poll_id
i32
pool
&DBPool
user_id
i32
poll_id
i32