update hak akses dan perbaikan api pembuatan tiket

This commit is contained in:
Fanrouver
2026-04-20 09:42:03 +07:00
parent 94ff9f55d9
commit 2bf00eff3c
38 changed files with 2054 additions and 2552 deletions

No files matched your search

+16
View File
@@ -65,6 +65,22 @@ export function deleteSession(sessionId: string): void {
console.log(`🗑️ Session deleted: ${sessionId.substring(0, 8)}... (Remaining: ${sessions.size})`);
}
export function updateSession(sessionId: string, updates: Partial<SessionData>): boolean {
const session = sessions.get(sessionId);
if (!session) {
return false;
}
// Update the session with new data
const updatedSession = {
...session,
...updates,
};
sessions.set(sessionId, updatedSession);
return true;
}
// Helper function to get session from cookie (for API handlers)
export async function getSessionFromCookie(event: any): Promise<SessionData | null> {
const { getCookie } = await import('h3');