Abstracted the logic that was on the rss page to be a lib itself
Used that lib on the part
Used that lib on a new service named 'rss'
This new service works in the following way:
If accessed with a query parameter method = "list", then it'll return an array of objects of type, { id, displayName, path } of all rss pages on the context in which the service was executed. Example:
If accessed with the query parameters method = "xml" and id = "<id of the content>", then it'll return the xml of that rss feed, if, of course, the id is of a content of type rss. Example:
Those two ways to call this service helps a lot when implementing a workaround of this app in a headless manner, for instance, using our next.xp solution.
To summarize this quite complex PR:
This new service works in the following way:
If accessed with a query parameter method = "list", then it'll return an array of objects of type,
{ id, displayName, path }
of all rss pages on the context in which the service was executed. Example:If accessed with the query parameters method = "xml" and id =
"<id of the content>"
, then it'll return the xml of that rss feed, if, of course, the id is of a content of type rss. Example:Those two ways to call this service helps a lot when implementing a workaround of this app in a headless manner, for instance, using our next.xp solution.