mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-22 11:31:01 +00:00
Define Post::slug()
This commit is contained in:
parent
859a1fd528
commit
87457c0ed1
1 changed files with 5 additions and 0 deletions
|
@ -253,6 +253,11 @@ impl Post {
|
|||
ap_url(&format!("{}/~/{}/{}/", CONFIG.base_url, blog.fqn, slug))
|
||||
}
|
||||
|
||||
// It's better to calc slug in insert and update
|
||||
pub fn slug(title: &str) -> &str {
|
||||
title
|
||||
}
|
||||
|
||||
pub fn get_authors(&self, conn: &Connection) -> Result<Vec<User>> {
|
||||
use crate::schema::post_authors;
|
||||
use crate::schema::users;
|
||||
|
|
Loading…
Reference in a new issue