Disallow naming an article 'new', or any already used slug
Fix #64 Also fixes a lot of potential bug with articles having the same slugs, but not in the same blog
This commit is contained in:
+1
-1
@@ -52,7 +52,7 @@ pub struct NewPost {
|
||||
impl Post {
|
||||
insert!(posts, NewPost);
|
||||
get!(posts);
|
||||
find_by!(posts, find_by_slug, slug as String);
|
||||
find_by!(posts, find_by_slug, slug as String, blog_id as i32);
|
||||
find_by!(posts, find_by_ap_url, ap_url as String);
|
||||
|
||||
pub fn count_local(conn: &PgConnection) -> usize {
|
||||
|
||||
Reference in New Issue
Block a user