mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Merge branch 'develop' into release
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import nconf from 'nconf';
|
||||
import { langCodes } from '../../libs/i18n';
|
||||
import { CONTENT_CACHE_PATH, getLocalizedContent } from '../../libs/content';
|
||||
import { CONTENT_CACHE_PATH, getLocalizedContentResponse } from '../../libs/content';
|
||||
|
||||
const IS_PROD = nconf.get('IS_PROD');
|
||||
|
||||
@@ -72,7 +72,7 @@ api.getContent = {
|
||||
'Content-Type': 'application/json',
|
||||
});
|
||||
|
||||
const jsonResString = getLocalizedContent(language);
|
||||
const jsonResString = getLocalizedContentResponse(language);
|
||||
res.status(200).send(jsonResString);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -607,9 +607,11 @@ api.joinGroup = {
|
||||
|
||||
let promises = [group.save(), user.save()];
|
||||
|
||||
if (inviter) {
|
||||
inviter = await User.findById(inviter).exec();
|
||||
// Load the inviter
|
||||
if (inviter) inviter = await User.findById(inviter).exec();
|
||||
|
||||
// Check the inviter again, could be a deleted account
|
||||
if (inviter) {
|
||||
const data = {
|
||||
headerText: common.i18n.t('invitationAcceptedHeader', inviter.preferences.language),
|
||||
bodyText: common.i18n.t('invitationAcceptedBody', {
|
||||
|
||||
Reference in New Issue
Block a user