Add icons to search query

This commit is contained in:
2024-09-03 20:14:31 +02:00
parent 2c100ecc13
commit 9f3e18ae0d
3 changed files with 13 additions and 3 deletions

View File

@@ -1,11 +1,12 @@
import { IconsCollection } from '~~/types/types'
export default defineEventHandler(async (event) => {
const collections = ['ph', 'heroicons']
const { query } = getQuery(event)
const response = await $fetch('https://api.iconify.design/search', {
params: {
query,
prefixes: collections.join(','),
prefixes: IconsCollection.join(','),
},
})