update hak akses dan perbaikan api pembuatan tiket
This commit is contained in:
No files matched your search
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user