This commit is contained in:
aprilthepink 2024-06-17 21:50:33 +02:00
parent a6c0fc4755
commit e8d716c7a5

View file

@ -35,7 +35,7 @@ pub async fn db_post_from_url(url: Url) -> anyhow::Result<entities::post::Model>
Ok(post) Ok(post)
} else { } else {
let post = fetch_note_from_url(url.clone()).await?; let post = fetch_note_from_url(url.clone()).await?;
receive_lysand_note(post, "example".to_string()).await?; receive_lysand_note(post, "https://ap.lysand.org/example".to_string()).await?;
let post_res: Option<post::Model> = prelude::Post::find().filter(entities::post::Column::Url.eq(str_url)).one(DB.get().unwrap()).await?; let post_res: Option<post::Model> = prelude::Post::find().filter(entities::post::Column::Url.eq(str_url)).one(DB.get().unwrap()).await?;
Ok(post_res.unwrap()) Ok(post_res.unwrap())
} }