Remove DELETED_REPLACEMENT_URL
authorFelix Ableitner <me@nutomic.com>
Mon, 26 Jun 2023 08:45:37 +0000 (10:45 +0200)
committerFelix Ableitner <me@nutomic.com>
Mon, 26 Jun 2023 08:45:37 +0000 (10:45 +0200)
crates/db_schema/src/impls/post.rs
crates/db_schema/src/utils.rs

index 7f59d29ecbc17e41bb4ba48ad96a04e8bcc6134a..6a4d53d3a9fd81557f7354733923c9e3749edb0e 100644 (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()),
index 7ba5d5e7b52380259fe7b42b12eb3651c33a2147..fdd445637b03f24b4be4af496aa2534202304828 100644 (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 {