Newer
Older
const { fetch_json_or_error_text } = require("./fetch");
}
function getArticleDate(date) {
return `${date.getDate()}-${date.getMonth() + 1}-${date.getFullYear()}`;
}
function loadArticles(category, locale) {
return fetch_json_or_error_text(`/articles/${category}/${locale}`);
}
module.exports = {
loadArticles,
getArticleBody,
getArticleDate,
};