refactor: zitadel server

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
This commit is contained in:
Yordis Prieto
2024-04-07 03:56:46 -04:00
parent 61f890f29b
commit 03fa791554
66 changed files with 1105 additions and 1066 deletions

View File

@@ -2,7 +2,6 @@ import {
getBrandingSettings,
getLoginSettings,
getSession,
server,
} from "@/lib/zitadel";
import Alert from "@/ui/Alert";
import DynamicTheme from "@/ui/DynamicTheme";
@@ -24,7 +23,7 @@ export default async function Page({
const { session, token } = await loadSession(loginName, organization);
const branding = await getBrandingSettings(server, organization);
const branding = await getBrandingSettings(organization);
async function loadSession(loginName?: string, organization?: string) {
const recent = await getMostRecentCookieWithLoginname(
@@ -32,7 +31,7 @@ export default async function Page({
organization,
);
return getSession(server, recent.id, recent.token).then((response) => {
return getSession(recent.id, recent.token).then((response) => {
return { session: response?.session, token: recent.token };
});
}