From 96864962292f861dd7be083234b8016df045d33f Mon Sep 17 00:00:00 2001 From: Alejandro Akbal <37181533+VoidlessSeven7@users.noreply.github.com> Date: Tue, 23 Feb 2021 13:04:23 +0100 Subject: [PATCH] feat: fetch with supported config values --- store/booru.js | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/store/booru.js b/store/booru.js index c1dd2412..be4f5fae 100644 --- a/store/booru.js +++ b/store/booru.js @@ -340,19 +340,26 @@ export const actions = { ) } - // if (activeBooru.config?.endpoints?.tags) { - // urlToFetch.searchParams.append( - // 'tagsEndpoint', - // activeBooru.config.endpoints.tags - // ) - // } - - // if (activeBooru.config?.queryIdentifiers?.tags?.tag) { - // urlToFetch.searchParams.append( - // 'defaultQueryIdentifiersTagsTag', - // activeBooru.config.queryIdentifiers.tags.tag - // ) - // } + if (activeBooru.config?.endpoints?.tags) { + urlToFetch.searchParams.append( + 'tagsEndpoint', + activeBooru.config.endpoints.tags + ) + } + + if (activeBooru.config?.queryIdentifiers?.tags?.tag) { + urlToFetch.searchParams.append( + 'defaultQueryIdentifiersTagsTag', + activeBooru.config.queryIdentifiers.tags.tag + ) + } + + if (activeBooru.config?.queryIdentifiers?.tags?.tagEnding !== undefined) { + urlToFetch.searchParams.append( + 'defaultQueryIdentifiersTagsTagEnding', + activeBooru.config.queryIdentifiers.tags.tagEnding + ) + } } return urlToFetch.toString()