mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
fix(guilds): correct various errors
This commit is contained in:
@@ -461,10 +461,9 @@ api.getChallengeTasks = {
|
||||
const group = await Group.getGroup({
|
||||
user,
|
||||
groupId: challenge.group,
|
||||
fields: '_id type privacy',
|
||||
optionalMembership: true,
|
||||
fields: '_id type privacy purchased',
|
||||
});
|
||||
if (!group || !challenge.canView(user, group)) throw new NotFound(res.t('challengeNotFound'));
|
||||
if (!group && !challenge.canView(user, group)) throw new NotFound(res.t('challengeNotFound'));
|
||||
|
||||
const tasks = await getTasks(req, res, { user, challenge });
|
||||
return res.respond(200, tasks);
|
||||
|
||||
Reference in New Issue
Block a user