Remove searcher from arguments of Post::delete() and dependented methods

This commit is contained in:
Kitaiti Makoto
2021-01-07 22:51:46 +09:00
parent 2a8cc5f3ba
commit fc8ee1c3bc
7 changed files with 21 additions and 31 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
use crate::{
ap_url, instance::*, medias::Media, posts::Post, safe_string::SafeString, schema::blogs,
search::Searcher, users::User, Connection, Error, PlumeRocket, Result, CONFIG, ITEMS_PER_PAGE,
users::User, Connection, Error, PlumeRocket, Result, CONFIG, ITEMS_PER_PAGE,
};
use activitypub::{
actor::Group,
@@ -317,9 +317,9 @@ impl Blog {
.and_then(|c| c.url().ok())
}
pub fn delete(&self, conn: &Connection, searcher: &Searcher) -> Result<()> {
pub fn delete(&self, conn: &Connection) -> Result<()> {
for post in Post::get_for_blog(conn, &self)? {
post.delete(conn, searcher)?;
post.delete(conn)?;
}
diesel::delete(self)
.execute(conn)