Squashed commit of the following:
commit 474fa530a0392ff6e7461eaff64c81a67b5e4eff Author: SabreCat <sabe@habitica.com> Date: Fri Aug 18 21:44:09 2023 -0500 fix(challenges): filter out groups without perms
This commit is contained in:
@@ -418,6 +418,9 @@ export default {
|
||||
methods: {
|
||||
async shown () {
|
||||
this.groups = await this.$store.dispatch('guilds:getMyGuilds');
|
||||
this.groups = this.groups.filter(group => !(
|
||||
group.leaderOnly.challenges && group.leader !== this.user._id
|
||||
));
|
||||
|
||||
if (this.user.party && this.user.party._id) {
|
||||
await this.$store.dispatch('party:getParty');
|
||||
|
||||
@@ -321,7 +321,7 @@ api.getGroups = {
|
||||
throw new BadRequest(apiError('guildsOnlyPaginate'));
|
||||
}
|
||||
|
||||
const groupFields = basicGroupFields.concat(' description memberCount balance');
|
||||
const groupFields = basicGroupFields.concat(' description memberCount balance leaderOnly');
|
||||
const sort = '-memberCount';
|
||||
|
||||
const filters = {};
|
||||
|
||||
Reference in New Issue
Block a user