mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-25 23:25:51 +00:00
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:
parent
1fa926ac04
commit
9e0e2a83be
2 changed files with 4 additions and 1 deletions
|
|
@ -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 = {};
|
||||
|
|
|
|||
Loading…
Reference in a new issue