Skip to content

Commit

Permalink
fix(accounts): account creation fail with groups
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel authored Jun 29, 2022
1 parent fb2ef82 commit 2e5420f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/api/v2/accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ accountsApi.create = async function (req, res) {
let groups = []
if (postData.groups) {
groups = await Group.getGroups(postData.groups)
for (const group in groups) {
for (const group of groups) {
await group.addMember(savedId)
await group.save()
}
Expand Down

0 comments on commit 2e5420f

Please sign in to comment.