|
@@ -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") {
|