* Update an existing session with new data * @param sessionId The session ID * @param updatedData The updated session data
(
sessionId: string,
updatedData: Partial<UserSession>
)
| 59 | * @param updatedData The updated session data |
| 60 | */ |
| 61 | async updateSession( |
| 62 | sessionId: string, |
| 63 | updatedData: Partial<UserSession> |
| 64 | ): Promise<void> { |
| 65 | const session = await this.getSession(sessionId); |
| 66 | if (!session) return; |
| 67 | |
| 68 | const updatedSession = { ...session, ...updatedData }; |
| 69 | await this.saveSession(sessionId, updatedSession); |
| 70 | } |
| 71 | |
| 72 | /** |
| 73 | * Refresh a token if it's close to expiration |
no test coverage detected