Define Blog::slug()

This commit is contained in:
Kitaiti Makoto 2022-05-20 01:50:51 +09:00
parent 65829094c9
commit 4dfe300ee3

View File

@ -95,6 +95,10 @@ impl Blog {
find_by!(blogs, find_by_ap_url, ap_url as &str);
find_by!(blogs, find_by_name, actor_id as &str, instance_id as i32);
pub fn slug(title: &str) -> &str {
title
}
pub fn get_instance(&self, conn: &Connection) -> Result<Instance> {
Instance::get(conn, self.instance_id)
}