File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ export default async function handler() {
14
14
( release ) => release . version === latestRelease . version ,
15
15
)
16
16
) {
17
- return {
18
- statusCode : 200 ,
19
- body : JSON . stringify ( { message : "Release already analyzed" } ) ,
20
- } ;
17
+ return new Response ( JSON . stringify ( { message : "Release already analyzed" } ) , {
18
+ status : 200 ,
19
+ headers : { 'Content-Type' : 'application/json' } ,
20
+ } ) ;
21
21
}
22
22
23
23
const analysis = await analyzeReleaseNotes (
@@ -39,16 +39,16 @@ export default async function handler() {
39
39
) ;
40
40
}
41
41
42
- return {
43
- statusCode : 200 ,
44
- body : JSON . stringify ( { message : "Release analyzed and stored" } ) ,
45
- } ;
42
+ return new Response ( JSON . stringify ( { message : "Release analyzed and stored" } ) , {
43
+ status : 200 ,
44
+ headers : { 'Content-Type' : 'application/json' } ,
45
+ } ) ;
46
46
} catch ( error ) {
47
47
console . error ( "Error in check-nextjs-release function:" , error ) ;
48
- return {
49
- statusCode : 500 ,
50
- body : JSON . stringify ( { error : "Internal server error" } ) ,
51
- } ;
48
+ return new Response ( JSON . stringify ( { error : "Internal server error" } ) , {
49
+ status : 500 ,
50
+ headers : { 'Content-Type' : 'application/json' } ,
51
+ } ) ;
52
52
}
53
53
}
54
54
You can’t perform that action at this time.
0 commit comments