lib/mno_enterprise/concerns/controllers/jpi/v1/teams_controller.rb in mno-enterprise-api-3.3.0 vs lib/mno_enterprise/concerns/controllers/jpi/v1/teams_controller.rb in mno-enterprise-api-3.3.1

- old
+ new

@@ -14,11 +14,11 @@ # Instance methods #================================================================== # GET /mnoe/jpi/v1/organizations/:organization_id/teams def index authorize! :read, parent_organization - @teams = parent_organization.teams + @teams = MnoEnterprise::Team.where(organization_id: params[:organization_id]) end # GET /mnoe/jpi/v1/teams/:id def show @team = MnoEnterprise::Team.find(params[:id]) @@ -93,9 +93,10 @@ users.each { |u| @team.send(action, u) } MnoEnterprise::EventLogger.info('team_update', current_user.id, 'Team composition updated', @team, {action: action.to_s, users: users.map(&:email)}) end + @team.reload render 'show' end def team_params