mirror of
https://github.com/versia-pub/activitypub.git
synced 2026-03-13 10:59:17 +01:00
format
This commit is contained in:
parent
b278cd8a27
commit
25d857c0f3
3 changed files with 5 additions and 5 deletions
|
|
@ -53,7 +53,9 @@ pub async fn db_post_from_url(url: Url) -> anyhow::Result<entities::post::Model>
|
|||
}
|
||||
|
||||
pub async fn db_user_from_url(url: Url) -> anyhow::Result<entities::user::Model> {
|
||||
if !url.domain().eq(&Some(LYSAND_DOMAIN.as_str())) && !url.domain().eq(&Some(API_DOMAIN.as_str())) {
|
||||
if !url.domain().eq(&Some(LYSAND_DOMAIN.as_str()))
|
||||
&& !url.domain().eq(&Some(API_DOMAIN.as_str()))
|
||||
{
|
||||
return Err(anyhow!("not lysands domain"));
|
||||
}
|
||||
let user_res: Option<user::Model> = prelude::User::find()
|
||||
|
|
|
|||
|
|
@ -35,9 +35,7 @@ async fn fetch_post(
|
|||
|
||||
Ok(HttpResponse::Ok()
|
||||
.content_type(FEDERATION_CONTENT_TYPE)
|
||||
.json(
|
||||
crate::objects::post::Note::from_db(&post)
|
||||
))
|
||||
.json(crate::objects::post::Note::from_db(&post)))
|
||||
}
|
||||
|
||||
#[get("/apbridge/create/{id}/{base64url}")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue