Skip to content
Snippets Groups Projects
Commit af0eed9b authored by Dessalines's avatar Dessalines
Browse files

Try post limit reject.

parent 609b53b6
No related branches found
Tags 0.16.4-rc.7
No related merge requests found
...@@ -134,6 +134,9 @@ impl PerformCrud for GetPosts { ...@@ -134,6 +134,9 @@ impl PerformCrud for GetPosts {
// if data.community_name.is_none() && data.community_id.is_none() { // if data.community_name.is_none() && data.community_id.is_none() {
// return Err(LemmyError::from_message("no_id_given")); // return Err(LemmyError::from_message("no_id_given"));
// } // }
if data.limit >= 50 {
return Err(LemmyError::from_message("limit_too_high"));
}
let local_user_view = let local_user_view =
get_local_user_view_from_jwt_opt(data.auth.as_ref(), context.pool(), context.secret()) get_local_user_view_from_jwt_opt(data.auth.as_ref(), context.pool(), context.secret())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment