Make Projects::Settings:CiCdController#reset_cache a json endpoint
This commit is contained in:
parent
daa0c9293b
commit
7fc88fd76a
1 changed files with 6 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue