fix: local config, empty accounts page

This commit is contained in:
Max Peintner
2023-05-25 08:40:53 +02:00
parent bb9527d11a
commit e7b997739a
3 changed files with 8 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ async function loadSessions(): Promise<Session[]> {
); );
return response?.sessions ?? []; return response?.sessions ?? [];
} else { } else {
console.info("No session cookie found.");
return []; return [];
} }
} }

View File

@@ -13,6 +13,12 @@ const nextConfig = {
port: "", port: "",
pathname: "/**", pathname: "/**",
}, },
{
protocol: "http",
hostname: "localhost",
port: "8080",
pathname: "/**",
},
], ],
}, },
}; };

View File

@@ -100,7 +100,7 @@ export async function getAllSessionIds(): Promise<any> {
const sessions: SessionCookie[] = JSON.parse(stringifiedCookie?.value); const sessions: SessionCookie[] = JSON.parse(stringifiedCookie?.value);
return sessions.map((session) => session.id); return sessions.map((session) => session.id);
} else { } else {
return Promise.reject(); return [];
} }
} }