0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

"Update default count value from 10 to 20 in VaultPage component and vault API"

This commit is contained in:
Víctor Losada Hernández
2024-07-23 23:57:05 +02:00
parent ddf2006285
commit 01ee184044
2 changed files with 2 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ const VaultPage = (props) => {
const [title, setTitle] = useState(props.query.title || '');
const [legacy, setLegacy] = useState(props.query.legacy !== 'false');
const [v3, setV3] = useState(props.query.v3 !== 'false');
const [count, setCount] = useState(props.query.count || 10);
const [count, setCount] = useState(props.query.count || 20);
const [page, setPage] = useState(parseInt(props.query.page) || 1);
const [brewCollection, setBrewCollection] = useState(null);
const [totalBrews, setTotalBrews] = useState(null);

View File

@@ -61,7 +61,7 @@ const vault = {
const title = req.query.title || '';
const page = Math.max(parseInt(req.query.page) || 1, 1);
const mincount = 10;
const count = Math.max(parseInt(req.query.count) || 10, mincount);
const count = Math.max(parseInt(req.query.count) || 20, mincount);
const skip = (page - 1) * count;
const brewsQuery = buildBrewsQuery(req.query.legacy, req.query.v3);