diff options
Diffstat (limited to 'src/types/like.rs')
-rw-r--r-- | src/types/like.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/types/like.rs b/src/types/like.rs index bf10b2d..1c113c1 100644 --- a/src/types/like.rs +++ b/src/types/like.rs @@ -7,13 +7,12 @@ use crate::types::http::{ResponseCode, Result}; #[derive(Serialize)] pub struct Like { pub user_id: u64, - pub post_id: u64 + pub post_id: u64, } impl Like { #[instrument()] pub fn add_liked(user_id: u64, post_id: u64) -> Result<()> { - let Ok(liked) = database::likes::add_liked(user_id, post_id) else { return Err(ResponseCode::BadRequest.text("Failed to add like status")) }; |