aboutsummaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
Diffstat (limited to 'auth')
-rw-r--r--auth/index.js5
-rw-r--r--auth/public/index.html4
2 files changed, 6 insertions, 3 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 @@
<fieldset>
<legend>Login</legend>
<label for="username">Username</label>
- <input name="username" type="text" id="username" placeholder="Username" />
+ <input name="username" type="text" id="username" placeholder="Username" required />
<label for="password">Passwort</label>
- <input name="password" type="password" id="password" placeholder="Passwort" />
+ <input name="password" type="password" id="password" placeholder="Passwort" required />
<label for="remember" class="pure-checkbox">
<input name="remember" type="checkbox" id="remember" />
Angemeldet bleiben