mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
* feat(api-v4): new /faq route added * refactor(server): change of function name in libs/content.js
This commit is contained in:
@@ -14,8 +14,13 @@ function walkContent (obj, lang) {
|
||||
});
|
||||
}
|
||||
|
||||
export function getLocalizedContent (langCode) {
|
||||
const contentClone = _.cloneDeep(common.content);
|
||||
walkContent(contentClone, langCode);
|
||||
return `{"success": true, "data": ${JSON.stringify(contentClone)}}`;
|
||||
export function localizeContentData (data, langCode) {
|
||||
const dataClone = _.cloneDeep(data);
|
||||
walkContent(dataClone, langCode);
|
||||
return dataClone;
|
||||
}
|
||||
|
||||
export function getLocalizedContentResponse (langCode) {
|
||||
const localizedContent = localizeContentData(common.content, langCode);
|
||||
return `{"success": true, "data": ${JSON.stringify(localizedContent)}}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user