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, PostUpdateForm,
}, },
traits::{Crud, Likeable, Readable, Saveable}, traits::{Crud, Likeable, Readable, Saveable},
utils::{ utils::{get_conn, naive_now, DbPool, DELETED_REPLACEMENT_TEXT, FETCH_LIMIT_MAX},
get_conn,
naive_now,
DbPool,
DELETED_REPLACEMENT_TEXT,
DELETED_REPLACEMENT_URL,
FETCH_LIMIT_MAX,
},
}; };
use ::url::Url; use ::url::Url;
use diesel::{dsl::insert_into, result::Error, ExpressionMethods, QueryDsl, TextExpressionMethods}; 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))) diesel::update(post.filter(creator_id.eq(for_creator_id)))
.set(( .set((
name.eq(DELETED_REPLACEMENT_TEXT), name.eq(DELETED_REPLACEMENT_TEXT),
url.eq(DELETED_REPLACEMENT_URL), url.eq(Option::<&str>::None),
body.eq(DELETED_REPLACEMENT_TEXT), body.eq(DELETED_REPLACEMENT_TEXT),
deleted.eq(true), deleted.eq(true),
updated.eq(naive_now()), 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_TEXT: &str = "*Permanently Deleted*";
pub const DELETED_REPLACEMENT_URL: &str = "https://join-lemmy.org/";
impl ToSql<Text, Pg> for DbUrl { impl ToSql<Text, Pg> for DbUrl {
fn to_sql(&self, out: &mut Output<Pg>) -> diesel::serialize::Result { fn to_sql(&self, out: &mut Output<Pg>) -> diesel::serialize::Result {