Skip to content

Commit

Permalink
Parse query params for /certified
Browse files Browse the repository at this point in the history
  • Loading branch information
carkod authored Dec 15, 2023
2 parents 9f0c26e + 74d0484 commit 9a6e77e
Show file tree
Hide file tree
Showing 5 changed files with 487 additions and 156 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ google-cloud-datastore==2.16.1
django-openid-auth==0.17
time-machine==2.9.0
filelock==3.12.0
bleach==6.0.0
6 changes: 3 additions & 3 deletions static/js/src/certified-search-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ function retrieveSelectedFilters() {
const path = window.location.pathname;
const pathCategory = path.replace("/certified/", "");

let selectedCategories;
let selectedCategories = [];
let selectedVendors = urlParams.getAll("vendor");
let selectedReleases = urlParams.getAll("release");

if (pathCategory !== "/certified") {
selectedCategories = urlParams.getAll("category").push(pathCategory);
selectedCategories = urlParams.getAll("category");
selectedCategories.push(pathCategory);
} else {
selectedCategories = urlParams.getAll("category");
}

return {
category: selectedCategories,
vendor: selectedVendors,
Expand Down
Loading

0 comments on commit 9a6e77e

Please sign in to comment.