1
0
Fork 0

fix: Issues in newsletter script

This commit is contained in:
Joost De Cock 2022-06-28 16:07:30 +02:00
parent c8db51bb76
commit 84042a28bd

View file

@ -18,9 +18,9 @@ const cwd = path.dirname(fileURLToPath(import.meta.url))
const backend = "https://backend.freesewing.org/"
const asHtml = async (text) => {
let content = await unified().use(markdown).use(remark2rehype).use(format).use(html).process(text)
const content = await unified().use(markdown).use(remark2rehype).use(format).use(html).process(text)
return content.contents
return content.value
}
const getToken = async () => {
@ -51,7 +51,7 @@ const send = async (test = true) => {
console.log(err)
process.exit()
}
const text = edition.body
const text = edition.data[0].body
const subscribers = await getSubscribers(test)
const content = await asHtml(text)