Skip to content

Commit

Permalink
Added group toJSON conversion and fixed syntax errors
Browse files Browse the repository at this point in the history
  • Loading branch information
TheHollidayInn committed Jan 23, 2016
1 parent febc48c commit 2063070
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions test/helpers/api-integration/api-classes.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ export class ApiGroup extends ApiObject {

let update = { chat };

this.update(update, '$push');

return this;
return await this.update(update);
}
}

Expand Down
1 change: 1 addition & 0 deletions website/src/controllers/api-v3/groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ api.getGroup = {
if (!group) throw new NotFound(res.t('groupNotFound'));

if (!user.contributor.admin) {
group = group.toJSON();
_.remove(group.chat, function removeChat (chat) {
chat.flags = {};
return chat.flagCount >= 2;
Expand Down

0 comments on commit 2063070

Please sign in to comment.