From 91f4af6e9a3a5d770f98d4a5b75c729c18861cc1 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 1 Oct 2020 17:33:08 +0200 Subject: Some thingies --- auth/index.js | 5 ++++- auth/public/index.html | 4 ++-- db.js | 2 +- quotes/index.js | 22 ++++++++++++++++++++-- quotes/public/index.html | 6 +++--- quotes/public/script.js | 17 ++++------------- 6 files changed, 34 insertions(+), 22 deletions(-) diff --git a/auth/index.js b/auth/index.js index 9bc3f58..b726a25 100644 --- a/auth/index.js +++ b/auth/index.js @@ -9,6 +9,9 @@ const app = express.Router(); app.use("/", express.static(__dirname + "/public")); -app.get("/api/list", (req, res) => {}); +app.get("/api/list", async (req, res) => { + const users = await db.query("SELECT id, name, middlename, surname FROM users"); + res.json(users); +}); module.exports = app; diff --git a/auth/public/index.html b/auth/public/index.html index 8bf9ecd..e927b13 100644 --- a/auth/public/index.html +++ b/auth/public/index.html @@ -18,9 +18,9 @@
Login - + - +