mirror of https://github.com/LemmyNet/lemmy.git
undo post.url rewriting, move http route definition
parent
986913d250
commit
388eb42b99
|
@ -12,6 +12,7 @@ use lemmy_api_common::{
|
|||
honeypot_check,
|
||||
local_site_to_slur_regex,
|
||||
mark_post_as_read,
|
||||
process_markdown_opt,
|
||||
EndpointType,
|
||||
},
|
||||
};
|
||||
|
@ -31,14 +32,13 @@ use lemmy_utils::{
|
|||
error::{LemmyError, LemmyErrorExt, LemmyErrorType},
|
||||
spawn_try_task,
|
||||
utils::{
|
||||
slurs::{check_slurs},
|
||||
slurs::check_slurs,
|
||||
validation::{check_url_scheme, clean_url_params, is_valid_body_field, is_valid_post_title},
|
||||
},
|
||||
};
|
||||
use tracing::Instrument;
|
||||
use url::Url;
|
||||
use webmention::{Webmention, WebmentionError};
|
||||
use lemmy_api_common::utils::process_markdown_opt;
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
pub async fn create_post(
|
||||
|
|
|
@ -6,7 +6,7 @@ use lemmy_api_common::{
|
|||
post::{EditPost, PostResponse},
|
||||
request::fetch_site_data,
|
||||
send_activity::{ActivityChannel, SendActivityData},
|
||||
utils::{check_community_user_action, local_site_to_slur_regex},
|
||||
utils::{check_community_user_action, local_site_to_slur_regex, process_markdown_opt},
|
||||
};
|
||||
use lemmy_db_schema::{
|
||||
source::{
|
||||
|
@ -26,7 +26,6 @@ use lemmy_utils::{
|
|||
},
|
||||
};
|
||||
use std::ops::Deref;
|
||||
use lemmy_api_common::utils::process_markdown_opt;
|
||||
|
||||
#[tracing::instrument(skip(context))]
|
||||
pub async fn update_post(
|
||||
|
|
|
@ -25,7 +25,12 @@ use html2text::{from_read_with_decorator, render::text_renderer::TrivialDecorato
|
|||
use lemmy_api_common::{
|
||||
context::LemmyContext,
|
||||
request::fetch_site_data,
|
||||
utils::{is_mod_or_admin, local_site_opt_to_sensitive, local_site_opt_to_slur_regex},
|
||||
utils::{
|
||||
is_mod_or_admin,
|
||||
local_site_opt_to_sensitive,
|
||||
local_site_opt_to_slur_regex,
|
||||
process_markdown_opt,
|
||||
},
|
||||
};
|
||||
use lemmy_db_schema::{
|
||||
self,
|
||||
|
@ -40,16 +45,11 @@ use lemmy_db_schema::{
|
|||
};
|
||||
use lemmy_utils::{
|
||||
error::LemmyError,
|
||||
utils::{
|
||||
markdown::markdown_to_html,
|
||||
slurs::{check_slurs_opt},
|
||||
validation::check_url_scheme,
|
||||
},
|
||||
utils::{markdown::markdown_to_html, slurs::check_slurs_opt, validation::check_url_scheme},
|
||||
};
|
||||
use std::ops::Deref;
|
||||
use stringreader::StringReader;
|
||||
use url::Url;
|
||||
use lemmy_api_common::utils::process_markdown_opt;
|
||||
|
||||
const MAX_TITLE_LENGTH: usize = 200;
|
||||
|
||||
|
|
Loading…
Reference in New Issue