fix(content): include app version in response

This commit is contained in:
Matteo Pagliazzi
2020-07-18 15:36:44 +02:00
parent d8badb6d12
commit 9f85d3927f

View File

@@ -1,6 +1,7 @@
import _ from 'lodash';
import path from 'path';
import common from '../../common';
import packageInfo from '../../../package.json';
export const CONTENT_CACHE_PATH = path.join(__dirname, '/../../../content_cache/');
@@ -22,5 +23,5 @@ export function localizeContentData (data, langCode) {
export function getLocalizedContentResponse (langCode) {
const localizedContent = localizeContentData(common.content, langCode);
return `{"success": true, "data": ${JSON.stringify(localizedContent)}}`;
return `{"success": true, "data": ${JSON.stringify(localizedContent)}, "appVersion": "${packageInfo.version}"}`;
}