Skip to content

Commit

Permalink
fix: puppeteer screenshot return type is uint8array now
Browse files Browse the repository at this point in the history
  • Loading branch information
mplewis committed Oct 5, 2024
1 parent 4e44e46 commit 35b048e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions api/src/services/events/ogImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ function renderTemplate(values: Record<string, string>): string {
return Handlebars.compile(indexHbs)(values)
}

async function renderImage(values: Record<string, string>): Promise<Buffer> {
async function renderImage(
values: Record<string, string>
): Promise<Uint8Array> {
const indexHtml = renderTemplate(values)

const executablePath =
Expand Down Expand Up @@ -222,7 +224,7 @@ export async function renderEventPreview(event: {
end: string | Date
title: string
description: string
}): Promise<Buffer> {
}): Promise<Uint8Array> {
const s = dayjs(event.start)
const e = dayjs(event.end)
const month = s.format('MMM')
Expand Down

0 comments on commit 35b048e

Please sign in to comment.