mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
fix(groups): return Plans on GET guilds
This commit is contained in:
parent
3109a03055
commit
cce6d91611
2 changed files with 3 additions and 6 deletions
|
|
@ -33,8 +33,6 @@
|
|||
<li v-html="$t('commGuideList02E')"></li>
|
||||
<li v-html="$t('commGuideList02O')"></li>
|
||||
<li v-html="$t('commGuidePara037')"></li>
|
||||
<li v-html="$t('commGuidePara02P')"></li>
|
||||
<li v-html="$t('commGuidePara02Q')"></li>
|
||||
<li v-html="$t('commGuideList02M')"></li>
|
||||
<li v-html="$t('commGuideList02L')"></li>
|
||||
<li v-html="$t('commGuideList02J')"></li>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ export const { TAVERN_ID } = shared;
|
|||
const NO_CHAT_NOTIFICATIONS = [TAVERN_ID];
|
||||
const { LARGE_GROUP_COUNT_MESSAGE_CUTOFF } = shared.constants;
|
||||
const { MAX_SUMMARY_SIZE_FOR_GUILDS } = shared.constants;
|
||||
const { GUILDS_PER_PAGE } = shared.constants;
|
||||
|
||||
const { CHAT_FLAG_LIMIT_FOR_HIDING } = shared.constants;
|
||||
|
||||
|
|
@ -280,13 +279,12 @@ schema.statics.getGroup = async function getGroup (options = {}) {
|
|||
return group;
|
||||
};
|
||||
|
||||
export const VALID_QUERY_TYPES = ['party', 'guilds', 'privateGuilds', 'publicGuilds', 'tavern'];
|
||||
export const VALID_QUERY_TYPES = ['party', 'guilds', 'privateGuilds', 'tavern'];
|
||||
|
||||
schema.statics.getGroups = async function getGroups (options = {}) {
|
||||
const {
|
||||
user, types, groupFields = basicFields,
|
||||
sort = '-memberCount', populateLeader = false,
|
||||
paginate = false, page = 0, // optional pagination for public guilds
|
||||
filters = {},
|
||||
} = options;
|
||||
const queries = [];
|
||||
|
|
@ -303,6 +301,7 @@ schema.statics.getGroups = async function getGroups (options = {}) {
|
|||
}));
|
||||
break;
|
||||
}
|
||||
case 'guilds':
|
||||
case 'privateGuilds': {
|
||||
const query = {
|
||||
type: 'guild',
|
||||
|
|
@ -312,7 +311,7 @@ schema.statics.getGroups = async function getGroups (options = {}) {
|
|||
$or: [
|
||||
{ 'purchased.plan.dateTerminated': null },
|
||||
{ 'purchased.plan.dateTerminated': { $exists: false } },
|
||||
{ 'purchased.plan.dateTerminated': { $gt: new Date() }},
|
||||
{ 'purchased.plan.dateTerminated': { $gt: new Date() } },
|
||||
],
|
||||
};
|
||||
_.assign(query, filters);
|
||||
|
|
|
|||
Loading…
Reference in a new issue