Skip to content

Commit

Permalink
Merge pull request #43 from slickage/limit-fix
Browse files Browse the repository at this point in the history
Limit fix
  • Loading branch information
crod951 authored Jan 9, 2025
2 parents 7cecd42 + 5330211 commit 01f2068
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/epochtalk_server_web/controllers/post.ex
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ defmodule EpochtalkServerWeb.Controllers.Post do
defp proxy_by_thread(conn, attrs) do
with thread_id <- Validate.cast(attrs, "thread_id", :integer, required: true),
page <- Validate.cast(attrs, "page", :integer, default: 1),
limit <- Validate.cast(attrs, "limit", :integer, default: 25),
limit <- Validate.cast(attrs, "limit", :integer, default: 25, min: 1, max: 100),
user <- Guardian.Plug.current_resource(conn),
user_priority <- ACL.get_user_priority(conn),
:ok <- ACL.allow!(conn, "posts.byThread"),
Expand Down
2 changes: 1 addition & 1 deletion lib/epochtalk_server_web/controllers/thread.ex
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ defmodule EpochtalkServerWeb.Controllers.Thread do
defp proxy_by_board(conn, attrs) do
with board_id <- Validate.cast(attrs, "board_id", :integer, required: true),
page <- Validate.cast(attrs, "page", :integer, default: 1),
limit <- Validate.cast(attrs, "limit", :integer, default: 5),
limit <- Validate.cast(attrs, "limit", :integer, default: 25, min: 1, max: 100),
user <- Guardian.Plug.current_resource(conn),
user_priority <- ACL.get_user_priority(conn),
:ok <- ACL.allow!(conn, "threads.byBoard"),
Expand Down

0 comments on commit 01f2068

Please sign in to comment.