Skip to content

Commit

Permalink
feat: fetch with supported config values
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Feb 23, 2021
1 parent c2dab28 commit 9686496
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions store/booru.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9686496

Please sign in to comment.