your personal website on atproto - mirror blento.app

refactor pt3

+13 -5
+11 -2
src/lib/atproto/settings.ts
··· 1 1 export const SITE = 'https://flo-bit.dev'; 2 2 3 - export const collections: string[] = ['xyz.statusphere.status']; 3 + export const collections: string[] = [ 4 + 'app.blento.card', 5 + 'app.blento.page', 6 + 'app.blento.settings', 7 + 'app.blento.comment', 8 + 'app.blento.guestbook.entry', 9 + 'site.standard.publication', 10 + 'site.standard.document', 11 + 'xyz.statusphere.status' 12 + ]; 4 13 5 14 export const rpcCalls: Record<string, string | string[]> = { 6 15 //'did:web:api.bsky.app#bsky_appview': ['app.bsky.actor.getProfile'] 7 16 }; 8 17 9 - export const blobs = ['video/*', 'text/html'] as string | string[] | undefined; 18 + export const blobs = ['*/*'] as string | string[] | undefined; 10 19 11 20 export const signUpPDS = 'https://pds.rip/';
+2 -2
src/lib/helper.ts
··· 274 274 275 275 if (now - (data.updatedAt || 0) > TEN_MINUTES) { 276 276 try { 277 - await fetch('/' + data.handle + '/api/refreshData'); 277 + await fetch('/' + data.handle + '/api/refresh'); 278 278 console.log('successfully refreshed data', data.handle); 279 279 } catch (error) { 280 280 console.error('error refreshing data', error); ··· 486 486 487 487 await Promise.all(promises); 488 488 489 - fetch('/' + data.handle + '/api/refreshData').then(() => { 489 + fetch('/' + data.handle + '/api/refresh').then(() => { 490 490 console.log('data refreshed!'); 491 491 }); 492 492 console.log('refreshing data');
src/routes/[handle=handle]/api/refreshData/+server.ts src/routes/[handle=handle]/api/refresh/+server.ts
-1
src/routes/all/+page.svelte
··· 1 1 <script lang="ts"> 2 2 import { createEmptyCard, refreshData } from '$lib/helper.js'; 3 3 import Website from '$lib/website/Website.svelte'; 4 - import { onMount } from 'svelte'; 5 4 6 5 let { data } = $props(); 7 6