tangled
alpha
login
or
join now
flo-bit.dev
/
blento
your personal website on atproto - mirror
blento.app
20
fork
atom
overview
issues
pulls
pipelines
add updating back in for main account
Florian
3 weeks ago
c3cdb964
63bfeba4
+2
-2
1 changed file
expand all
collapse all
unified
split
src
lib
helper.ts
+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);