summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/docker/README.md2
-rw-r--r--examples/docker/web/public/js/main.js5
2 files changed, 2 insertions, 5 deletions
diff --git a/examples/docker/README.md b/examples/docker/README.md
index bf9fb01..55566b1 100644
--- a/examples/docker/README.md
+++ b/examples/docker/README.md
@@ -19,7 +19,7 @@ docker-compose start -d
#### Then follow these steps:
1. Visit the http://localhost:3000/admin to configure Ponzu.
-2. Add several songs http://localhost:3000/admin/reviews
+2. Add several songs http://localhost:3000/admin/contents?type=Song
3. Visit http://localhost:3000/ to see the rest service accessed via AJAX
Stop the containers:
diff --git a/examples/docker/web/public/js/main.js b/examples/docker/web/public/js/main.js
index cce225b..f9ae5fc 100644
--- a/examples/docker/web/public/js/main.js
+++ b/examples/docker/web/public/js/main.js
@@ -1,9 +1,6 @@
(function() {
- let mainContainer;
-
function loadHomepage() {
- mainContainer = document.querySelector('#main');
const xhr = new XMLHttpRequest();
xhr.open('GET', '/api/contents?type=Song');
xhr.onreadystatechange = renderHomepage;
@@ -38,7 +35,7 @@
html = '<p><strong>The /api endpoint did not respond correctly :-(</strong></p>';
}
- mainContainer.innerHTML = html;
+ document.querySelector('#main').innerHTML = html;
}
}