API-v4 route added: 'api/v4/faq' fixes #11801 (#11905)

* feat(api-v4): new /faq route added

* refactor(server): change of function name in libs/content.js
This commit is contained in:
Denys Dorokhov
2020-04-14 23:14:53 +03:00
committed by GitHub
parent 551abf292c
commit 186b929e59
8 changed files with 181 additions and 10 deletions

View File

@@ -6,7 +6,7 @@ gulp.task('content:cache', done => {
// Requiring at runtime because these files access `common`
// code which in production works only if transpiled so after
// gulp build:babel:common has run
const { CONTENT_CACHE_PATH, getLocalizedContent } = require('../website/server/libs/content'); // eslint-disable-line global-require
const { CONTENT_CACHE_PATH, getLocalizedContentResponse } = require('../website/server/libs/content'); // eslint-disable-line global-require
const { langCodes } = require('../website/server/libs/i18n'); // eslint-disable-line global-require
try {
@@ -23,7 +23,7 @@ gulp.task('content:cache', done => {
langCodes.forEach(langCode => {
fs.writeFileSync(
`${CONTENT_CACHE_PATH}${langCode}.json`,
getLocalizedContent(langCode),
getLocalizedContentResponse(langCode),
'utf8',
);
});