mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-10 02:05:10 +00:00
Remove DELETED_REPLACEMENT_URL
This commit is contained in:
parent
6b28f8c616
commit
ce0cf0e41b
|
@ -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()),
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue