extern crate diesel_migrations;
use diesel::{result::Error, *};
+use lemmy_db_schema::Url;
use regex::Regex;
use serde::{Deserialize, Serialize};
use std::{env, env::VarError};
}
pub trait ApubObject<T> {
- fn read_from_apub_id(conn: &PgConnection, object_id: &str) -> Result<Self, Error>
+ fn read_from_apub_id(conn: &PgConnection, object_id: &Url) -> Result<Self, Error>
where
Self: Sized;
fn upsert(conn: &PgConnection, user_form: &T) -> Result<Self, Error>