Commit b61128e5 authored by Timothy Andrew's avatar Timothy Andrew Committed by Alfredo Sumaran

After updating a protected branch, include it's access levels in the JSON response.

1. We might need to update/delete access levels that were created in
   this `update` call without a page refresh.

2. The JS relies on the JSON response for the IDs of the newly created
   access level records.
parent f081bd7b
......@@ -34,7 +34,7 @@ class Projects::ProtectedBranchesController < Projects::ApplicationController
if @protected_branch.valid?
respond_to do |format|
format.json { render json: @protected_branch, status: :ok }
format.json { render json: @protected_branch, status: :ok, include: [:merge_access_levels, :push_access_levels] }
end
else
respond_to do |format|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment