File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change 11const facts = require ( "./starwarsFacts" ) ;
22
3- MediaSourceHandle . exports . starwarsfact = async ( event ) => {
4- const randomFact = facts [ Math . floor ( Math . random ( ) * facts . length ) ] ;
5- return {
6- statsCode : 200 ,
7- headers : {
8- "Content-Type" : "application/json" ,
9- "Access-Control-Allow-Origin" : "https://cloud.mrcyberleon.org"
10- } ,
11- body : JSON . stringify ( { fact : randomFact } )
12- } ;
13- } ;
3+ module . exports . starwarsfact = async ( event ) => {
4+ const randomFact = facts [ Math . floor ( Math . random ( ) * facts . length ) ] ;
5+
6+ return {
7+ statusCode : 200 ,
8+ headers : {
9+ "Content-Type" : "application/json" ,
10+ "Access-Control-Allow-Origin" : "https://cloud.mrcyberleon.org"
11+ } ,
12+ body : JSON . stringify ( { fact : randomFact } )
13+ } ;
14+ } ;
You can’t perform that action at this time.
0 commit comments