File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -10,17 +10,15 @@ function getHostname(event, context) {
10
10
return `http://${ event . headers . host } ` ;
11
11
}
12
12
13
- const netlify = ( context . clientContext . custom || { } ) . netlify ;
14
- const decoded = JSON . parse ( Buffer . from ( netlify , 'base64' ) . toString ( 'utf-8' ) ) ;
15
- return decoded . site_url ;
13
+ const { netlify } = context . clientContext . custom || { } ;
14
+
15
+ return JSON . parse ( Buffer . from ( netlify , 'base64' ) . toString ( 'utf-8' ) ) . site_url ;
16
16
}
17
17
18
18
function handler ( event , context , callback ) {
19
- const params = event . queryStringParameters ;
20
-
19
+ const { panes, markup, query } = event . queryStringParameters ;
21
20
const host = getHostname ( event , context ) ;
22
21
23
- const { panes, markup, query } = params ;
24
22
const oembedSearch = queryString . stringify ( {
25
23
url : `${ host } /embed?${ queryString . stringify ( { panes, markup, query } ) } ` ,
26
24
format : 'json' ,
You can’t perform that action at this time.
0 commit comments