mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2025-02-16 23:15:14 +00:00
Create blog_authors only when needed
This commit is contained in:
parent
702aa11ecf
commit
ebb0b45299
1 changed files with 13 additions and 10 deletions
|
@ -706,17 +706,20 @@ impl FromId<DbConn> for Post {
|
||||||
cover_id: cover,
|
cover_id: cover,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
})?;
|
.and_then(|post| {
|
||||||
|
for author in authors {
|
||||||
|
PostAuthor::insert(
|
||||||
|
conn,
|
||||||
|
NewPostAuthor {
|
||||||
|
post_id: post.id,
|
||||||
|
author_id: author.id,
|
||||||
|
},
|
||||||
|
)?;
|
||||||
|
}
|
||||||
|
|
||||||
for author in authors {
|
Ok(post)
|
||||||
PostAuthor::insert(
|
})
|
||||||
conn,
|
})?;
|
||||||
NewPostAuthor {
|
|
||||||
post_id: post.id,
|
|
||||||
author_id: author.id,
|
|
||||||
},
|
|
||||||
)?;
|
|
||||||
}
|
|
||||||
|
|
||||||
// save mentions and tags
|
// save mentions and tags
|
||||||
let mut hashtags = md_to_html(&post.source, None, false, None)
|
let mut hashtags = md_to_html(&post.source, None, false, None)
|
||||||
|
|
Loading…
Reference in a new issue