File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,10 @@ export const getGoogleSheetsValidations = (data) => {
44
44
body : raw ,
45
45
redirect : 'follow' ,
46
46
} ;
47
- return fetch ( 'http://localhost:8000/expectations/metadata/gsheet' , requestOptions )
47
+ return fetch (
48
+ window . REACT_APP_VALIDLY_SERVER_URL + `/expectations/metadata/gsheet` ,
49
+ requestOptions ,
50
+ )
48
51
. then ( ( response ) => response . json ( ) )
49
52
. then ( ( validationData ) => {
50
53
const validationDataArray = getValidationDataArray ( validationData ) ;
Original file line number Diff line number Diff line change @@ -6,7 +6,13 @@ const Documentation = () => {
6
6
const [ docs , setDocs ] = useState ( { } ) ;
7
7
const [ loading , setLoading ] = useState ( true ) ;
8
8
useEffect ( ( ) => {
9
- fetch ( window . REACT_APP_VALIDLY_SERVER_URL + '/docs/expectations' )
9
+ let myHeaders = new Headers ( ) ;
10
+ myHeaders . append ( 'Content-Type' , 'application/json' ) ;
11
+ let requestOptions = {
12
+ method : 'GET' ,
13
+ headers : myHeaders ,
14
+ } ;
15
+ fetch ( window . REACT_APP_VALIDLY_SERVER_URL + '/docs/expectations/' , requestOptions )
10
16
. then ( ( response ) => response . json ( ) )
11
17
. then ( ( response ) => {
12
18
setDocs ( response ) ;
You can’t perform that action at this time.
0 commit comments