diff options
Diffstat (limited to 'auth')
-rw-r--r-- | auth/index.js | 5 | ||||
-rw-r--r-- | auth/public/index.html | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/auth/index.js b/auth/index.js index bbe3589..69f6435 100644 --- a/auth/index.js +++ b/auth/index.js @@ -39,6 +39,9 @@ app.put("/api/password", async (req, res) => { } }); -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 |