mirror of
https://github.com/fmhy/edit.git
synced 2026-01-18 01:41:52 +11:00
fix(api): add User-Agent for requests
This commit is contained in:
parent
ff3688e3aa
commit
cef2fb1efd
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue