feat : lobby

This commit is contained in:
2024-12-29 23:39:15 +01:00
parent e0ece631d3
commit d92739bbd6
14 changed files with 313 additions and 203 deletions
+4 -3
View File
@@ -2,18 +2,19 @@ const validPaths = ["/", "/rules", "/test", "/words"];
export default defineNuxtRouteMiddleware(async (to, from) => {
const config = useRuntimeConfig();
if (to.path.startsWith("/game/")) {
return;
}
if (to.path == "/login") {
console.log("hey")
const code = to.query.code;
if (!code) {
navigateTo(config.public.discordLoginEndpoint, { external: true });
} else {
navigateTo("/login");
}
return
return;
}
if (validPaths.includes(to.path)) {
return;
}