File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -34,3 +34,4 @@ yarn-error.log*
34
34
# typescript
35
35
* .tsbuildinfo
36
36
next-env.d.ts
37
+ .env
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ export async function POST(request: Request) {
5
5
const params = new URLSearchParams ( {
6
6
q : question ,
7
7
mkt : "en-US" ,
8
+ count : "6" ,
9
+ safeSearch :"Strict"
8
10
} ) ;
9
11
10
12
const response = await fetch (
@@ -21,10 +23,10 @@ export async function POST(request: Request) {
21
23
const bingJson = await response . json ( ) ;
22
24
const bingResults = bingJson . webPages . value ;
23
25
24
- const firstSixResults = bingResults . slice ( 0 , 6 ) . map ( ( result : any ) => ( {
26
+ const Results = bingResults . map ( ( result : any ) => ( {
25
27
name : result . name ,
26
28
url : result . url ,
27
29
} ) ) ;
28
30
29
- return NextResponse . json ( firstSixResults ) ;
31
+ return NextResponse . json ( Results ) ;
30
32
}
You can’t perform that action at this time.
0 commit comments