Update Site source

This commit is contained in:
Meghdad committed 2026-10-12 23:45:51 +03:30
1 parent 3144a675e6
commit d34e9e3901
13 files changed
+180 -48

No files matched your search

+4 -3
View File
@@ -2,16 +2,17 @@ import { ImageResponse } from 'next/og';
import { createElement } from 'react';
import { readLedger } from '../../../lib/server';
import { ledgerSnapshot } from '../../../lib/share';
import { ShareCard } from '../../../lib/share-card';
import { socialFonts } from '../../../lib/social-fonts';
import { ShareCard, cardWidth, cardHeight } from '../../../lib/share-card';
export const dynamic = 'force-dynamic';
export async function GET() {
try {
const data = await ledgerSnapshot(await readLedger());
return new ImageResponse(createElement(ShareCard, {data}), {
width:1200,height:630,
width:cardWidth,height:cardHeight,fonts:[...socialFonts],
headers:{'Cache-Control':'no-store, max-age=0','X-Ledger-Revision':data.revision},
});
} catch {
return new Response('Live vault image is temporarily unavailable.',{status:503,headers:{'Cache-Control':'no-store'}});
return new Response('تصویر زنده خزانه موقتاً در دسترس نیست.',{status:503,headers:{'Cache-Control':'no-store'}});
}
}