your personal website on atproto - mirror blento.app

add updating back in for main account

Florian c3cdb964 63bfeba4

+2 -2
+2 -2
src/lib/helper.ts
··· 260 } 261 262 export async function refreshData(data: { updatedAt?: number; handle: string }) { 263 - const FIVE_MINUTES = 5 * 60 * 1000; 264 const now = Date.now(); 265 266 - if (now - (data.updatedAt || 0) > FIVE_MINUTES && data.handle !== 'blento.app') { 267 try { 268 await fetch('/' + data.handle + '/api/refreshData'); 269 console.log('successfully refreshed data', data.handle);
··· 260 } 261 262 export async function refreshData(data: { updatedAt?: number; handle: string }) { 263 + const TEN_MINUTES = 10 * 60 * 1000; 264 const now = Date.now(); 265 266 + if (now - (data.updatedAt || 0) > TEN_MINUTES) { 267 try { 268 await fetch('/' + data.handle + '/api/refreshData'); 269 console.log('successfully refreshed data', data.handle);