Refactor base-url & add documentation

This commit is contained in:
Svilen Markov
2024-08-05 14:08:16 +01:00
parent c2cdd0fa08
commit e1161b9227
4 changed files with 20 additions and 7 deletions

View File

@@ -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;