Remove DELETED_REPLACEMENT_URL

This commit is contained in:
Felix Ableitner 2023-06-26 10:45:37 +02:00
parent 6b28f8c616
commit ce0cf0e41b
2 changed files with 2 additions and 10 deletions

View file

@ -27,14 +27,7 @@ use crate::{
PostUpdateForm,
},
traits::{Crud, Likeable, Readable, Saveable},
utils::{
get_conn,
naive_now,
DbPool,
DELETED_REPLACEMENT_TEXT,
DELETED_REPLACEMENT_URL,
FETCH_LIMIT_MAX,
},
utils::{get_conn, naive_now, DbPool, DELETED_REPLACEMENT_TEXT, FETCH_LIMIT_MAX},
};
use ::url::Url;
use diesel::{dsl::insert_into, result::Error, ExpressionMethods, QueryDsl, TextExpressionMethods};
@ -121,7 +114,7 @@ impl Post {
diesel::update(post.filter(creator_id.eq(for_creator_id)))
.set((
name.eq(DELETED_REPLACEMENT_TEXT),
url.eq(DELETED_REPLACEMENT_URL),
url.eq(Option::<&str>::None),
body.eq(DELETED_REPLACEMENT_TEXT),
deleted.eq(true),
updated.eq(naive_now()),

View file

@ -279,7 +279,6 @@ pub mod functions {
}
pub const DELETED_REPLACEMENT_TEXT: &str = "*Permanently Deleted*";
pub const DELETED_REPLACEMENT_URL: &str = "https://join-lemmy.org/";
impl ToSql<Text, Pg> for DbUrl {
fn to_sql(&self, out: &mut Output<Pg>) -> diesel::serialize::Result {