0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-03 14:52:38 +00:00

changed order of params per request

This commit is contained in:
Víctor Losada Hernández
2024-06-13 01:13:38 +02:00
parent cb0cb32860
commit bdfd194672

View File

@@ -47,7 +47,7 @@ const VaultPage = (props) => {
const url = new URL(window.location.href); const url = new URL(window.location.href);
const urlParams = new URLSearchParams(); const urlParams = new URLSearchParams();
Object.entries({ title, page, count, v3, legacy }).forEach( Object.entries({ title, v3, legacy, count, page }).forEach(
([key, value]) => urlParams.set(key, value) ([key, value]) => urlParams.set(key, value)
); );
@@ -64,7 +64,7 @@ const VaultPage = (props) => {
if (title !== '') { if (title !== '') {
try { try {
const response = await request.get( const response = await request.get(
`/api/vault?title=${title}&page=${page}&count=${count}&v3=${v3}&legacy=${legacy}` `/api/vault?title=${title}&v3=${v3}&legacy=${legacy}&count=${count}&page=${page}`
); );
if (response.ok) { if (response.ok) {
updateStateWithBrews(response.body.brews, page); updateStateWithBrews(response.body.brews, page);