Move tag posters and photos to media database.

This commit is contained in:
2019-12-04 21:58:08 +01:00
parent cf81aa99e0
commit 55e3130062
51 changed files with 861 additions and 184 deletions

View File

@@ -1,7 +1,8 @@
import config from 'config';
async function get(endpoint, query = {}) {
const q = new URLSearchParams(query).toString();
const curatedQuery = Object.entries(query).reduce((acc, [key, value]) => (value ? { ...acc, [key]: value } : acc), {}); // remove empty values
const q = new URLSearchParams(curatedQuery).toString();
const res = await fetch(`${config.api.url}${endpoint}?${q}`, {
method: 'GET',