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:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user