mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-12-23 10:30:41 +00:00
Define Blog::slug()
This commit is contained in:
parent
65829094c9
commit
4dfe300ee3
1 changed files with 4 additions and 0 deletions
|
@ -95,6 +95,10 @@ impl Blog {
|
||||||
find_by!(blogs, find_by_ap_url, ap_url as &str);
|
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);
|
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> {
|
pub fn get_instance(&self, conn: &Connection) -> Result<Instance> {
|
||||||
Instance::get(conn, self.instance_id)
|
Instance::get(conn, self.instance_id)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue