Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search: result per page 50 -> 100 and make configurable #38

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions server/config/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ disableGUI: false
# You can disable searching through the GUI
disableSearchGUI: false

# How many max entries do you want per page?
search:
resultPerPage: 100

## Configure the GUI
html:
css:
Expand Down
2 changes: 1 addition & 1 deletion server/src/routes/html/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function shortURL(url, longVersion) {
}

search.get('/', async function (request, response) {
const limit = request.query.limit || 50;
const limit = request.query.limit || nconf.get('search:resultPerPage') || 100;
const currentPage = Number.parseInt(request.query.page, 10) || 1;
let result = await (request.query.search === '' ||
request.query.search === undefined
Expand Down