mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-02-10 16:13:11 +00:00
Cleaning up post_link_tags
This commit is contained in:
parent
04f7d390f5
commit
2029c853b9
1 changed files with 0 additions and 3 deletions
|
@ -12,7 +12,6 @@ struct Params {
|
|||
|
||||
pub fn config(cfg: &mut web::ServiceConfig) {
|
||||
cfg.route("/post_link_tags", web::get().to(get_post_links_response));
|
||||
// .app_data(Data::new(client));
|
||||
}
|
||||
|
||||
async fn get_post_links_response(
|
||||
|
@ -21,12 +20,10 @@ async fn get_post_links_response(
|
|||
) -> Result<HttpResponse, Error> {
|
||||
let url =
|
||||
Url::parse(&info.url).map_err(|_| ErrorBadRequest(LemmyError::from(anyhow!("not_found"))))?;
|
||||
println!("url: {:?}", url);
|
||||
|
||||
let json = fetch_post_link_tags(context.client(), &url)
|
||||
.await
|
||||
.map_err(|_| ErrorBadRequest(LemmyError::from(anyhow!("not_found"))))?;
|
||||
println!("json: {:?}", json);
|
||||
|
||||
Ok(HttpResponse::Ok().json(json))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue