Skip to content

Commit

Permalink
fix(Booru list): add missing config parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Nov 13, 2023
1 parent 56271b8 commit 70c0c15
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions assets/js/domain.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ export interface Domain {

type: BooruTypeObj

config: Record<string, unknown> | null

isPremium: boolean
}
8 changes: 6 additions & 2 deletions composables/useBooruList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ const defaultBooruList: Domain[] = completeBooruList.map((booruObj, index) => {
throw new Error(`Booru type not found: ${ booruObj.type }`)

return {
...booruObj,
domain: booruObj.domain,

type: booruType,

config: booruObj.config,

// The first 7 boorus are free
isPremium: index > 6
}
} as Domain
})

const userBooruList = useStorage('user-booruList', cloneDeep(defaultBooruList), localStorage, {
Expand Down
1 change: 1 addition & 0 deletions pages/posts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ const tagResults: Ref<Tag[]> = ref([])
async function onSearchTag(tag: string) {
const apiUrl = config.public.API_URL + '/booru/' + selectedBooru.value.type.type + '/tags'
// TODO: Use Booru options
const response = await $fetch(apiUrl, {
params: {
baseEndpoint: selectedBooru.value.domain,
Expand Down

0 comments on commit 70c0c15

Please sign in to comment.