chore: ads post

This commit is contained in:
Cory Dransfeldt 2023-05-23 09:01:57 -07:00
parent 4f8f032a25
commit 98ad50f265
No known key found for this signature in database
4 changed files with 57 additions and 6 deletions

View file

@ -15,9 +15,9 @@ module.exports = {
mdToHtml: (content) => {
return marked.parse(content)
},
getFirstAttachment: (post) => {
if (post && post['attachments'] && post['attachments'].length > 0) {
return post['attachments'][0].url ? post['attachments'][0].url : post['attachments'][0]
getPostImage: (post) => {
if (post && post['image'] && post['image'] !== '') {
return post['image']
}
return '/assets/img/social-card.png'