Remove unnessessary brackets
This commit is contained in:
parent
70aa790c16
commit
d17d9fd036
@ -8,10 +8,9 @@ export class API {
|
|||||||
let params = "";
|
let params = "";
|
||||||
params += ArrayToArrayUrlParams("categories", venueFilters?.categories.map((c) => c.name) ?? []);
|
params += ArrayToArrayUrlParams("categories", venueFilters?.categories.map((c) => c.name) ?? []);
|
||||||
params += ArrayToArrayUrlParams("tags", venueFilters?.tags.map((v) => v.name) ?? [], params.length < 1);
|
params += ArrayToArrayUrlParams("tags", venueFilters?.tags.map((v) => v.name) ?? [], params.length < 1);
|
||||||
params += venueFilters?.nameFilter ? `${(params.length < 1 ? "?" : "&")}search=${venueFilters.nameFilter}` : "";
|
params += venueFilters?.nameFilter ? `${params.length < 1 ? "?" : "&"}search=${venueFilters.nameFilter}` : "";
|
||||||
|
|
||||||
const response = await fetch(`${this.baseAPIUrl}/venue${params}`);
|
const response = await fetch(`${this.baseAPIUrl}/venue${params}`);
|
||||||
console.log(`calling ${this.baseAPIUrl}/venue${params}`);
|
|
||||||
return await response.json();
|
return await response.json();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user