Added tag filter to releases query, enabled on homepage.
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
import config from 'config';
|
||||
|
||||
async function get(endpoint, query = {}) {
|
||||
const queryString = Object.entries(query).reduce((acc, [key, value], index) => `${acc}${index > 0 ? '&' : ''}${key}=${value}`, '?');
|
||||
import queryString from 'query-string';
|
||||
|
||||
const res = await fetch(`${config.api.url}${endpoint}${queryString}`, {
|
||||
async function get(endpoint, query = {}) {
|
||||
const q = queryString.stringify(query);
|
||||
|
||||
const res = await fetch(`${config.api.url}${endpoint}?${q}`, {
|
||||
method: 'GET',
|
||||
mode: 'cors',
|
||||
credentials: 'same-origin',
|
||||
|
||||
Reference in New Issue
Block a user