(sessionId)
| 34 | } |
| 35 | |
| 36 | export const deleteSession = async (sessionId) => { |
| 37 | const currentSessions = await getSessions() |
| 38 | const index = currentSessions.findIndex((session) => session.sessionId === sessionId) |
| 39 | currentSessions.splice(index, 1) |
| 40 | if (currentSessions.length > 0) { |
| 41 | await Browser.storage.local.set({ sessions: currentSessions }) |
| 42 | return currentSessions |
| 43 | } |
| 44 | return await resetSessions() |
| 45 | } |
| 46 | |
| 47 | export const getSession = async (sessionId) => { |
| 48 | const currentSessions = await getSessions() |
no test coverage detected