redirecter for ao3 that adds opengraph metadata

fix the opengraph images for series and chapters wheeze

Changed files
+2 -2
src
app
series
[seriesId]
works
[workId]
chapters
[chapterId]
+1 -1
src/app/series/[seriesId]/opengraph-image.jsx
···
const addr = `series/${seriesId}`
const data = await getSeries({seriesId: seriesId})
if (data.locked) return OGImageLocked({theme: theme})
-
const imageParams = await sanitizeData({type: 'series', data: data, props: defaults})
+
const imageParams = await sanitizeData({type: 'series', data: data, props: new URLSearchParams(defaults)})
const theme = imageParams.theme
const baseFont = baseFonts[imageParams.baseFont].displayName
const titleFont = titleFonts[imageParams.titleFont].displayName
+1 -1
src/app/works/[workId]/chapters/[chapterId]/opengraph-image.jsx
···
const addr = `works/${workId}/chapters/${chapterId}`
const data = await getWork({workId: workId, chapterId: chapterId})
if (data.locked) return OGImageLocked({theme: process.env.DEFAULT_THEME})
-
const imageParams = await sanitizeData({type: 'work', data: data, props: defaults})
+
const imageParams = await sanitizeData({type: 'work', data: data, props: new URLSearchParams(defaults)})
const theme = imageParams.theme
const baseFont = baseFonts[imageParams.baseFont].displayName
const titleFont = titleFonts[imageParams.titleFont].displayName