fix(api): add User-Agent for requests

This commit is contained in:
taskylizard 2024-07-27 07:35:48 +00:00
parent ff3688e3aa
commit cef2fb1efd
No known key found for this signature in database
GPG key ID: 1820131ED1A24120

View file

@ -23,9 +23,14 @@ interface File {
export default defineEventHandler(async () => {
let body = ''
const f = fetcher({
headers: {
'User-Agent': 'taskylizard'
}
})
try {
// event.waitUntil(async () => {
const f = fetcher()
// Fetch the list of files in the repository
const files = await f.get<File[]>(GITHUB_REPO)