From 96a7e99e57f8c79eead599e6de5d94016f7021e6 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 2 Feb 2020 12:45:41 -0500 Subject: Removing PostLikeResponse in favor of PostResponse. Consolidating comment and post_sends. --- server/src/api/post.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'server/src/api/post.rs') diff --git a/server/src/api/post.rs b/server/src/api/post.rs index 642521eb..086705bc 100644 --- a/server/src/api/post.rs +++ b/server/src/api/post.rs @@ -55,11 +55,6 @@ pub struct CreatePostLike { auth: String, } -#[derive(Serialize, Deserialize, Clone)] -pub struct CreatePostLikeResponse { - pub post: PostView, -} - #[derive(Serialize, Deserialize)] pub struct EditPost { pub edit_id: i32, @@ -242,8 +237,8 @@ impl Perform for Oper { } } -impl Perform for Oper { - fn perform(&self, conn: &PgConnection) -> Result { +impl Perform for Oper { + fn perform(&self, conn: &PgConnection) -> Result { let data: &CreatePostLike = &self.data; let claims = match Claims::decode(&data.auth) { @@ -296,7 +291,7 @@ impl Perform for Oper { }; // just output the score - Ok(CreatePostLikeResponse { post: post_view }) + Ok(PostResponse { post: post_view }) } } -- cgit v1.2.3