MCPcopy Create free account
hub / github.com/TheNetsky/Microsoft-Rewards-Script / clearSessionRows

Function clearSessionRows

scripts/utils.js:292–302  ·  view source on GitHub ↗
(db, email)

Source from the content-addressed store, hash-verified

290}
291
292export function clearSessionRows(db, email) {
293 const info = email
294 ? db.prepare('DELETE FROM sessions WHERE LOWER(email) = LOWER(?)').run(email)
295 : db.prepare('DELETE FROM sessions').run()
296
297 try {
298 db.exec('PRAGMA wal_checkpoint(TRUNCATE)')
299 } catch {}
300
301 return Number(info.changes ?? 0)
302}

Callers 1

clearSessions.jsFile · 0.90

Calls 2

runMethod · 0.80
prepareMethod · 0.65

Tested by

no test coverage detected