File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99export const handler = async ( event ) => {
1010 const targetUrl = event . queryStringParameters ?. url ;
11-
11+
1212 const response = await fetch ( 'https://assam.tea.xyz/api/v2' + targetUrl , {
1313 headers : {
1414 'Origin' : 'https://assam.tea.xyz' ,
1515 'Accept' : 'application/json'
1616 }
1717 } ) ;
18-
18+
1919 const data = await response . json ( ) ;
20-
20+
2121 return {
2222 statusCode : 200 ,
2323 headers : {
24- 'Access-Control-Allow-Origin' : 'https://pkgx.dev' ,
2524 'Content-Type' : 'application/json'
2625 } ,
2726 body : JSON . stringify ( data )
Original file line number Diff line number Diff line change @@ -25,9 +25,7 @@ const TeaProtocol = () => {
2525 const fetchTeaStats = async ( ) => {
2626 // lambda proxy to bypass CORS
2727 const response = await fetch ( `https://yo2fkzmf2rh33u2b3bi3xhtqyi0toyqz.lambda-url.us-east-1.on.aws/?url=/stats` ) ;
28- console . log ( response ) ;
2928 const data = await response . json ( ) ;
30- console . log ( data ) ;
3129
3230 setStats ( {
3331 totalBlocks : parseInt ( data . total_blocks ) . toLocaleString ( ) ,
You can’t perform that action at this time.
0 commit comments