A decentralized music tracking and discovery platform built on AT Protocol 🎵
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: update session refresh logic to check for expiration in two days instead of one

+4 -2
+4 -2
apps/api/src/db.ts
··· 133 133 db: Database, 134 134 ctx: Context 135 135 ) => { 136 - const inOneDay = new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString(); 136 + const inTwoDays = new Date( 137 + Date.now() + 2 * 24 * 60 * 60 * 1000 138 + ).toISOString(); 137 139 const now = new Date().toISOString(); 138 140 139 141 const sessions = await db ··· 141 143 .selectAll() 142 144 .where("expiresAt", "is not", "NULL") 143 145 .where("expiresAt", ">", now) 144 - .where("expiresAt", "<=", inOneDay) 146 + .where("expiresAt", "<=", inTwoDays) 145 147 .orderBy("expiresAt", "asc") 146 148 .execute(); 147 149