aboutsummaryrefslogtreecommitdiffstats
path: root/public/js/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js/app.js')
-rw-r--r--public/js/app.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/public/js/app.js b/public/js/app.js
index 6148be4..c6899a7 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -27,7 +27,7 @@ function fetch_rooms(data_done) {
function load_screenings(data_done) {
let req = new XMLHttpRequest()
req.addEventListener("load", data_done)
- req.open("GET", "http://localhost:8000/screenings.json")
+ req.open("GET", "http://localhost:8000/screenings")
req.responseType = "json"
req.send()
}
@@ -50,13 +50,13 @@ function log_film(film) {
}
window.addEventListener("load", function() {
- /*
load_screenings(function() {
- this.response.forEach(function(film) {
- log_film(film)
+ console.log(this.response)
+ this.response.forEach(function(screening) {
+ console.log(screening.film.title + "@" + screening.room.name + ": " + screening.date)
})
})
- */
+
fetch_rooms(function() {
let table = document.getElementById("screening-table")
let row = document.createElement("tr")