Skip to content

Commit

Permalink
fix(congregations): update congregation members info after update
Browse files Browse the repository at this point in the history
  • Loading branch information
rhahao authored Jan 6, 2023
1 parent 4dd3b96 commit 1ca1c71
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/controllers/congregation-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1444,8 +1444,13 @@ export const updateCongregationInfo = async (req, res, next) => {
const data = { cong_name, cong_number };
await cong.updateInfo(data);

for await (const user of cong.cong_members) {
const tmpUser = users.findUserById(user.id);
await tmpUser.loadDetails();
}

cong.reloadMembers();
const user = users.findUserByEmail(email);
await user.loadDetails();

res.locals.type = 'info';
res.locals.message = 'congregation information updated';
Expand Down

0 comments on commit 1ca1c71

Please sign in to comment.