rename cookie fcn

This commit is contained in:
peintnermax
2023-09-28 14:57:25 +02:00
parent dc81b42944
commit 0e7e3edee8
2 changed files with 3 additions and 3 deletions

View File

@@ -1,12 +1,12 @@
import { Session } from "@zitadel/server"; import { Session } from "@zitadel/server";
import { listSessions, server } from "#/lib/zitadel"; import { listSessions, server } from "#/lib/zitadel";
import { getAllSessionIds } from "#/utils/cookies"; import { getAllSessionCookieIds } from "#/utils/cookies";
import { UserPlusIcon } from "@heroicons/react/24/outline"; import { UserPlusIcon } from "@heroicons/react/24/outline";
import Link from "next/link"; import Link from "next/link";
import SessionsList from "#/ui/SessionsList"; import SessionsList from "#/ui/SessionsList";
async function loadSessions(): Promise<Session[]> { async function loadSessions(): Promise<Session[]> {
const ids = await getAllSessionIds(); const ids = await getAllSessionCookieIds();
if (ids && ids.length) { if (ids && ids.length) {
const response = await listSessions( const response = await listSessions(

View File

@@ -135,7 +135,7 @@ export async function getSessionCookieByLoginName(
} }
} }
export async function getAllSessionIds(): Promise<any> { export async function getAllSessionCookieIds(): Promise<any> {
const cookiesList = cookies(); const cookiesList = cookies();
const stringifiedCookie = cookiesList.get("sessions"); const stringifiedCookie = cookiesList.get("sessions");