Skip to content

Rss and Json don't render author field #111

@vedmant

Description

@vedmant

I added author field to items:

ideas.forEach((idea) => {
    feed.addItem({
      title: idea.title,
      id: idea.short_id,
      link: `${urlBase}/${idea.short_id}/${idea.slug}`,
      content: idea.content,
      date: new Date(idea.idea_date),
      author: idea.user.name,
    })
  })

But in the rss elements are like this:

         <item>
            <title><![CDATA[New board]]></title>
            <link>https://www.bla.com/nkkmzt/new-board</link>
            <guid>nkkmzt</guid>
            <pubDate>Sat, 23 Jul 2022 16:22:21 GMT</pubDate>
            <content:encoded><![CDATA[<p>Test</p>]]></content:encoded>
        </item>

And for JSON:

{
id: "i43be6",
content_html: "<p>Test</p>",
url: "https://www.dailyidea.com/i43be6/an-idea",
title: "An idea",
date_modified: "2022-07-23T16:34:06.000Z",
author: { }
}

I validatedidea.user.name is present and are strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions