Browse Source

Fix pathing

ghorsington 3 years ago
parent
commit
f6e2414433
1 changed files with 1 additions and 3 deletions
  1. 1 3
      web/src/routes/_layout.svelte

+ 1 - 3
web/src/routes/_layout.svelte

@@ -11,8 +11,6 @@
   ) {
     const authResult = await this.fetch("/login/check", { credentials: "include" });
     const result = (await authResult.json()) as AuthInfo;
-    console.log(result);
-    console.log(path);
     if (path.startsWith("/login/")) {
       if (result.loggedIn) {
         return this.redirect(302, "/");
@@ -24,7 +22,7 @@
       return this.redirect(302, "/");
     }
     if (result.loggedIn) {
-      if (!path.startsWith("/rules")) {
+      if (path == "/") {
         return this.redirect(302, "/rules");
       }
       if (!result.moderator && path != "/rules") {