From 4482d4ca8a69dcfa3b082436a02cf25ee0870be0 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 29 Jan 2021 14:42:34 +0100 Subject: blabla --- admin/public/prediction.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 admin/public/prediction.js (limited to 'admin/public/prediction.js') diff --git a/admin/public/prediction.js b/admin/public/prediction.js new file mode 100644 index 0000000..66afb06 --- /dev/null +++ b/admin/public/prediction.js @@ -0,0 +1,11 @@ +const list = document.getElementById("list"); + +fetch("api/prediction") + .then((r) => r.json()) + .then((r) => { + r.forEach((d) => { + const elem = document.createElement("li"); + elem.innerText = `${d.uname} ${d.umid || ""} ${d.usur}: ${d.tname} ${d.tmid || ""} ${d.tsur}`; + list.appendChild(elem); + }); + }); -- cgit v1.2.3