@@ -10,8 +10,8 @@ export default {
10
10
headers : {
11
11
"Access-Control-Allow-Origin" : "*" ,
12
12
"Access-Control-Allow-Method" : "POST" ,
13
- "Access-Control-Allow-Headers" : "Content-Type" ,
14
- } ,
13
+ "Access-Control-Allow-Headers" : "Content-Type"
14
+ }
15
15
} ) ;
16
16
}
17
17
if ( request . method !== "POST" ) {
@@ -20,8 +20,8 @@ export default {
20
20
headers : {
21
21
"Access-Control-Allow-Origin" : "*" ,
22
22
"Access-Control-Allow-Method" : "POST" ,
23
- "Access-Control-Allow-Headers" : "Content-Type" ,
24
- } ,
23
+ "Access-Control-Allow-Headers" : "Content-Type"
24
+ }
25
25
} ) ;
26
26
}
27
27
const url = new URL ( request . url ) ;
@@ -30,11 +30,11 @@ export default {
30
30
try {
31
31
input = ( await request . json ( ) ) as unknown [ ] ;
32
32
} catch { }
33
- return Response . json ( functions [ functionName ] . bind ( env ) ( ...input ) , {
33
+ return Response . json ( await functions [ functionName ] . bind ( env ) ( ...input ) , {
34
34
headers : {
35
35
"Access-Control-Allow-Origin" : "*" ,
36
- "Access-Control-Allow-Method" : "POST" ,
37
- } ,
36
+ "Access-Control-Allow-Method" : "POST"
37
+ }
38
38
} ) ;
39
- } ,
39
+ }
40
40
} ;
0 commit comments