-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added initial get group tests #6563
Added initial get group tests #6563
Conversation
Okay, I just pushed a fix for a failing chat tests, because in this PR I removed the ability to view flags for a non-admin. I am going to work on converting the chat tests to await/async and adding the remaining tests after this, so I didn't make too many adjustments to the chat in this PR. |
@@ -152,6 +152,13 @@ api.getGroup = { | |||
let group = await Group.getGroup({user, groupId: req.params.groupId, populateLeader: true}); | |||
if (!group) throw new NotFound(res.t('groupNotFound')); | |||
|
|||
if (!user.contributor.admin) { | |||
_.remove(group.chat, function removeChat (chat) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TheHollidayInn here you probably want to convert the group to a plain object with group.toJSON before removing flags information
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will that help with?
6a58ab5
to
2063070
Compare
Updated! |
Most of the get group tests from V2 transferred. I removed some member tests, cleaned up some others, and added the new generating chat functions.
This is part of #6509.