Skip to content

Commit

Permalink
修复问题
Browse files Browse the repository at this point in the history
  • Loading branch information
fatwang2 committed Feb 4, 2024
1 parent 616ad8f commit 33e69db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions cloudflare-worker
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,8 @@ async function news(query) {
method: 'POST',
headers: {
"Content-Type": "application/json",
"newskey": typeof NEWS_KEY !== 'undefined' ? NEWS_KEY : '',
"Host": "ddg.search2ai.online"
},
"newskey": typeof NEWS_KEY !== 'undefined' ? NEWS_KEY : ''
},
body: JSON.stringify({
q: query,
max_results: 10
Expand Down
3 changes: 1 addition & 2 deletions units/news.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ async function news(query) {
method: 'POST',
headers: {
"Content-Type": "application/json",
"newskey": process.env.NEWS_KEY || '',
"Host": "ddg.search2ai.online"
"newskey": process.env.NEWS_KEY || ''
},
body: JSON.stringify({
q: query,
Expand Down

0 comments on commit 33e69db

Please sign in to comment.