Refactor base-url & add documentation
This commit is contained in:
1 parent
c2cdd0fa08
commit
e1161b9227
4 files changed
+20
-7
No files matched your search
@@ -24,7 +24,7 @@ function throttledDebounce(callback, maxDebounceTimes, debounceDelay) {
|
||||
async function fetchPageContent(pageData) {
|
||||
// TODO: handle non 200 status codes/time outs
|
||||
// TODO: add retries
|
||||
const response = await fetch(`${pageData.baseUrl}/api/pages/${pageData.slug}/content/`);
|
||||
const response = await fetch(`${pageData.baseURL}/api/pages/${pageData.slug}/content/`);
|
||||
const content = await response.text();
|
||||
|
||||
return content;
|
||||
|
||||
Reference in new issue
Block a user