use crate::SITE_NAME;
use db::models::*;
use diesel::pg::PgConnection;

pub fn invite_user_to_organization_email(
    config: &Config,
    invite: &OrganizationInvite,
    org: &Organization,
    recipient_name: &str,
    conn: &PgConnection,
) -> Result<(), ApiError> {
    let invite_link_accept = format!(
        "{}/invites/accept?token={}",
        config.front_end_url.clone(),
        invite.security_token.expect("Security token is not set")