mirror of
https://github.com/versia-pub/activitypub.git
synced 2025-12-06 14:48:19 +01:00
fix: correct method call in lysand/http
This commit is contained in:
parent
05c8acc71e
commit
566c444aed
|
|
@ -25,6 +25,8 @@ use crate::{
|
||||||
Response, API_DOMAIN, DB, FEDERATION_CONFIG,
|
Response, API_DOMAIN, DB, FEDERATION_CONFIG,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use super::conversion::db_user_from_url;
|
||||||
|
|
||||||
#[derive(serde::Deserialize)]
|
#[derive(serde::Deserialize)]
|
||||||
struct LysandQuery {
|
struct LysandQuery {
|
||||||
// Post url
|
// Post url
|
||||||
|
|
@ -213,10 +215,7 @@ pub async fn lysand_url_to_user(url: Url) -> anyhow::Result<super::objects::User
|
||||||
if let Some(model) = opt_model {
|
if let Some(model) = opt_model {
|
||||||
target = model;
|
target = model;
|
||||||
} else {
|
} else {
|
||||||
target = ObjectId::<user::Model>::from(url)
|
target = db_user_from_url(url).await?;
|
||||||
.dereference(&data.to_request_data())
|
|
||||||
.await
|
|
||||||
.unwrap();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(lysand_user_from_db(target).await?)
|
Ok(lysand_user_from_db(target).await?)
|
||||||
|
|
@ -236,10 +235,7 @@ pub async fn lysand_url_to_user_and_model(
|
||||||
if let Some(model) = opt_model {
|
if let Some(model) = opt_model {
|
||||||
target = model;
|
target = model;
|
||||||
} else {
|
} else {
|
||||||
target = ObjectId::<user::Model>::from(url)
|
target = db_user_from_url(url).await?;
|
||||||
.dereference(&data.to_request_data())
|
|
||||||
.await
|
|
||||||
.unwrap();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok((lysand_user_from_db(target.clone()).await?, target))
|
Ok((lysand_user_from_db(target.clone()).await?, target))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue