Method
create
(data: Omit<SessionData, "createdAt" | "expiresAt">)
Source from the content-addressed store, hash-verified
| 95 | // ── CRUD ────────────────────────────────────────────────────────────────── |
| 96 | |
| 97 | create(data: Omit<SessionData, "createdAt" | "expiresAt">): string { |
| 98 | const id = crypto.randomUUID(); |
| 99 | this.sessions.set(id, { |
| 100 | ...data, |
| 101 | createdAt: Date.now(), |
| 102 | expiresAt: Date.now() + SESSION_TTL_MS, |
| 103 | }); |
| 104 | return id; |
| 105 | } |
| 106 | |
| 107 | get(id: string): SessionData | undefined { |
| 108 | const s = this.sessions.get(id); |
Callers
nothing calls this directly
Tested by
no test coverage detected