diff --git a/client/src/components/NavBar.vue b/client/src/components/NavBar.vue index 64a6d6e..e11af91 100644 --- a/client/src/components/NavBar.vue +++ b/client/src/components/NavBar.vue @@ -1,14 +1,5 @@ @@ -18,27 +9,20 @@ async function logOut() { - - - Go Back - - + + + + Go Back + + - - - Add Track - - - - - - Log Out - - - - - + + + Add Track + + + - + \ No newline at end of file diff --git a/client/src/state.ts b/client/src/state.ts index 9e08abb..67c0955 100644 --- a/client/src/state.ts +++ b/client/src/state.ts @@ -2,7 +2,6 @@ import { reactive } from "vue" import { Track } from "./track" import { Tick } from './ticks' import { error } from "./error" -import { getCookie } from "./util"; enum State { Unfetched, @@ -32,8 +31,6 @@ class AppState { constructor() { this.tracks = new Array this.state = State.Unfetched - const name = getCookie("name") - if (name) this.user = { name } } streamUpdatesFromServer() { const source = new EventSource("/api/v1/updates") diff --git a/client/src/util.ts b/client/src/util.ts deleted file mode 100644 index ebbda1c..0000000 --- a/client/src/util.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function getCookie(key: string): string | null { - const start = document.cookie.indexOf(key + '=') - if(start === -1) return null - let end: number | undefined = document.cookie.indexOf(';', start) - if(end === -1) - end = undefined - return document.cookie.substring(start + key.length + 1, end) -} \ No newline at end of file diff --git a/server/src/api/auth.rs b/server/src/api/auth.rs index 415a122..29de90d 100644 --- a/server/src/api/auth.rs +++ b/server/src/api/auth.rs @@ -69,12 +69,6 @@ pub(super) async fn sign_up( Ok(()) } -#[delete("/")] -pub(super) async fn sign_out(cookies: &CookieJar<'_>) { - cookies.remove_private(Cookie::named("user")); - cookies.remove(Cookie::named("name")); -} - /// Authentication guard #[derive(Deref)] pub(super) struct Auth(users::Model); diff --git a/server/src/api/mod.rs b/server/src/api/mod.rs index eaae998..584d78e 100644 --- a/server/src/api/mod.rs +++ b/server/src/api/mod.rs @@ -114,7 +114,7 @@ pub fn start_server(db: DatabaseConnection) -> Rocket { "/api/v1/groups", routes![all_groups, group, insert_group, update_group, delete_group], ) - .mount("/api/v1/auth", routes![auth::login, auth::sign_up, auth::sign_out]) + .mount("/api/v1/auth", routes![auth::login, auth::sign_up]) .mount("/", FileServer::from("/src/public")); #[cfg(feature = "unsafe_import")] diff --git a/shell.nix b/shell.nix index f7556e2..be0c83f 100644 --- a/shell.nix +++ b/shell.nix @@ -2,16 +2,13 @@ { pkgs ? import {} }: pkgs.mkShell { - name = "kalkutago"; - nativeBuildInputs = with pkgs.buildPackages; [ - clang - yarn nodejs - openssl - python3 - python3Packages.requests - python3Packages.ipython - rustup - docker - gnumake + nativeBuildInputs = with pkgs.buildPackages; [ + clang + yarn nodejs + openssl + python3 + python3Packages.requests + python3Packages.ipython ]; } +