Skip to content

Commit

Permalink
feat: add loanId filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Bedon committed Sep 26, 2023
1 parent 1585d3d commit 1db4450
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/util/live-loan/live-loan-fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ const supportedFilterLegacy = name => {
case 'sort':
case 'theme':
case 'tag':
case 'loanids':
return true;
default:
warn(`Unsupported legacy filter "${name}"`);
Expand Down Expand Up @@ -291,7 +292,9 @@ async function parseFilterStringLegacy(filterString) {
.filter(([name]) => supportedFilterLegacy(name))
// Add each filter to the filter object
.forEach(([name, value]) => {
if (name === 'country') {
if (name === 'loanids') {
addArrayFilterValue('loanIds', Number(value));
} else if (name === 'country') {
addArrayFilterValue(name, value);
} else if (name === 'gender') {
setFilterValue(name, value);
Expand Down

0 comments on commit 1db4450

Please sign in to comment.