mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
fix(content): include app version in response
This commit is contained in:
@@ -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}"}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user