Skip to content

Commit c31af6f

Browse files
committed
fetch data from netlify functions
1 parent 7b2f2b6 commit c31af6f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ class App extends React.Component {
110110
})
111111
}
112112

113-
async fetchData(endpoint, baseUrl = 'https://api.hannoverjs.de/') {
113+
async fetchData(
114+
endpoint,
115+
baseUrl = 'https://hannoverjs.de/.netlify/functions/'
116+
) {
114117
const res = await fetch(`${baseUrl}${endpoint}`)
115118
return camelizeKeys(await res.json(), { deep: true })
116119
}

0 commit comments

Comments
 (0)