X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fapi_crud%2Fsrc%2Fpost%2Fcreate.rs;h=07e2cc27b6143f8a0f5b13da4aad9307c546393a;hb=969f8b2ce9cd80492eb5e556ce3bda95c9b892b3;hp=264cdbc829d9cdff851b538562ccc6aedcf826d6;hpb=3471f3533cb724b2cf6953d563aadfcc9f66c1d2;p=lemmy.git diff --git a/crates/api_crud/src/post/create.rs b/crates/api_crud/src/post/create.rs index 264cdbc8..07e2cc27 100644 --- a/crates/api_crud/src/post/create.rs +++ b/crates/api_crud/src/post/create.rs @@ -148,7 +148,10 @@ pub async fn create_post( let updated_post = Post::update( &mut context.pool(), inserted_post_id, - &PostUpdateForm::builder().ap_id(Some(apub_id)).build(), + &PostUpdateForm { + ap_id: Some(apub_id), + ..Default::default() + }, ) .await .with_lemmy_type(LemmyErrorType::CouldntCreatePost)?; @@ -194,7 +197,5 @@ pub async fn create_post( } }; - Ok(Json( - build_post_response(&context, community_id, person_id, post_id).await?, - )) + build_post_response(&context, community_id, person_id, post_id).await }