Commit 7fc88fd7 authored by Matija Čupić's avatar Matija Čupić

Make Projects::Settings:CiCdController#reset_cache a json endpoint

parent daa0c929
......@@ -13,12 +13,14 @@ module Projects
def reset_cache
if ResetProjectCacheService.new(@project, current_user).execute
flash[:notice] = _("Project cache successfully reset.")
respond_to do |format|
format.json { head :ok }
end
else
flash[:error] = _("Unable to reset project cache.")
respond_to do |format|
format.json { head :bad_request }
end
end
redirect_to project_pipelines_path(@project)
end
private
......
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