diff options
Diffstat (limited to 'src/api/posts.rs')
-rw-r--r-- | src/api/posts.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/api/posts.rs b/src/api/posts.rs index 3a2e507..d85fb98 100644 --- a/src/api/posts.rs +++ b/src/api/posts.rs @@ -72,6 +72,7 @@ async fn page( #[derive(Deserialize)] struct UsersPostsRequest { user_id: u64, + page: u64 } impl Check for UsersPostsRequest { @@ -84,7 +85,7 @@ async fn user( AuthorizedUser(_user): AuthorizedUser, Json(body): Json<UsersPostsRequest>, ) -> Response { - let Ok(posts) = Post::from_user_id(body.user_id) else { + let Ok(posts) = Post::from_user_post_page(body.user_id, body.page) else { return ResponseCode::InternalServerError.text("Failed to fetch posts") }; |