Skip to content

Commit

Permalink
figured out what URLSearchParam is
Browse files Browse the repository at this point in the history
  • Loading branch information
RalkeyOfficial committed Aug 14, 2024
1 parent 8487bcd commit 3c71258
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/store/modules/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ export const useSearchStore = defineStore('search', {
.filter(([key, value]) => value === true)
.map((metadata) => metadata[0])

console.log(enabledMetadataIds)
const searchParams = new URLSearchParams({
_search: this.search,
meta_data: enabledMetadataIds,
}).toString()

fetch(
'/index.php/apps/opencatalogi/api/search?_search=' + this.search,
fetch('/index.php/apps/opencatalogi/api/search?' + searchParams,
{
method: 'GET',
},
Expand Down

0 comments on commit 3c71258

Please sign in to comment.