21 lines
No EOL
584 B
JavaScript
21 lines
No EOL
584 B
JavaScript
export function parseArticles(articles) {
|
|
for (let i = 0; i < articles.length; i++) {
|
|
parseArticle(articles[i])
|
|
}
|
|
return articles
|
|
}
|
|
|
|
export function parseArticle(article) {
|
|
if (!article) {
|
|
return null
|
|
}
|
|
if (article.banner_path) {
|
|
article.banner_path = 'https://cdn.nfp.is' + article.banner_path
|
|
article.banner_prefix = 'https://cdn.nfp.is' + article.banner_prefix
|
|
}
|
|
if (article.media_path) {
|
|
article.media_path = 'https://cdn.nfp.is' + article.media_path
|
|
article.media_prefix = 'https://cdn.nfp.is' + article.media_prefix
|
|
}
|
|
return article
|
|
} |