diff options
author | LarsVomMars | 2020-10-16 20:03:56 +0200 |
---|---|---|
committer | LarsVomMars | 2020-10-16 20:03:56 +0200 |
commit | ff7f93139a63256c27e2ca25f03b12bdb0903667 (patch) | |
tree | ac28b506034006008cfc301bbb76c71c491c9593 /profile/public | |
parent | 5ecbb3244745c8ec311facc49917e901b81ff783 (diff) |
What am I doing
Diffstat (limited to 'profile/public')
-rw-r--r-- | profile/public/script.js | 1 | ||||
-rw-r--r-- | profile/public/user.html | 18 | ||||
-rw-r--r-- | profile/public/user.js | 0 | ||||
-rw-r--r-- | profile/public/users.html | 19 | ||||
-rw-r--r-- | profile/public/users.js | 9 |
5 files changed, 46 insertions, 1 deletions
diff --git a/profile/public/script.js b/profile/public/script.js index 2a170d2..3b39460 100644 --- a/profile/public/script.js +++ b/profile/public/script.js @@ -51,7 +51,6 @@ form.addEventListener("submit", async (evt) => { if (res !== "ok") alert("AHHHH"); else location.reload(); }); - fetch("api/user") .then((response) => response.json()) .then(updateHeading) diff --git a/profile/public/user.html b/profile/public/user.html new file mode 100644 index 0000000..85c186e --- /dev/null +++ b/profile/public/user.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width" /> + <title></title> + </head> + <body> + <div class="pure-menu pure-menu-horizontal"> + <a href="/" class="pure-menu-item pure-menu-link">Home</a> + <a href="/auth/api/logout" class="pure-menu-item pure-menu-link">Logout</a> + </div> + + <main></main> + + <script src="user.js" charset="utf-8"></script> + </body> +</html> diff --git a/profile/public/user.js b/profile/public/user.js new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/profile/public/user.js diff --git a/profile/public/users.html b/profile/public/users.html new file mode 100644 index 0000000..550ff4b --- /dev/null +++ b/profile/public/users.html @@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width" /> + <title>Benutzer</title> + <link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8" /> + </head> + <body> + <div class="pure-menu pure-menu-horizontal"> + <a href="/" class="pure-menu-item pure-menu-link">Home</a> + <a href="/auth/api/logout" class="pure-menu-item pure-menu-link">Logout</a> + </div> + + <main></main> + + <script src="users.js" charset="utf-8"></script> + </body> +</html> diff --git a/profile/public/users.js b/profile/public/users.js new file mode 100644 index 0000000..0f3700a --- /dev/null +++ b/profile/public/users.js @@ -0,0 +1,9 @@ +function addUser(user) { + const div = document.createElement("div"); + // Idk what to do lel +} + +fetch("api/users") + .then((response) => response.json()) + .then((response) => response.forEach(addUser)) + .catch(console.error); |