[Fix #2176] Allow setting page size in API
This commit is contained in:
parent
4f9bf73fe5
commit
b003fe9221
2 changed files with 8 additions and 1 deletions
|
@ -47,6 +47,6 @@ class API::V1::DossiersController < APIController
|
|||
end
|
||||
|
||||
def per_page # inherited value from will_paginate
|
||||
[params[:resultats_par_page] || DEFAULT_PAGE_SIZE, 1000].min
|
||||
[params[:resultats_par_page]&.to_i || DEFAULT_PAGE_SIZE, 1000].min
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue