Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update drizzle config to be up to date with the latest version #1881

Merged
merged 13 commits into from
May 10, 2024
Prev Previous commit
Next Next commit
fix lint
  • Loading branch information
juliusmarminge committed May 10, 2024
commit 54a10cf7db7085333e0a2b1b7bb0ae7b5bc4fde4
6 changes: 3 additions & 3 deletions upgrade/src/app/api/og/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ async function getFont<TWeights extends readonly number[]>({
";",
)}${text ? `&text=${encodeURIComponent(text)}` : ""}`;

const css = await (
const css: string = (await (
await fetch(API, {
headers: {
// Make sure it returns TTF.
"User-Agent":
"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; de-at) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1",
},
})
).text();
).text()) as string;

const fonts = css
.split("@font-face {")
Expand All @@ -131,6 +131,6 @@ async function getFont<TWeights extends readonly number[]>({
});

// Object.fromEntries is typed as returning any *sigh*

// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return Object.fromEntries(await Promise.all(promises));
}
Loading