Commit 2d4ba267 authored by Sean Edge's avatar Sean Edge

Update tags_controller.rb to use CreateTagService.

parent a8f2977c
...@@ -13,11 +13,8 @@ class Projects::TagsController < Projects::ApplicationController ...@@ -13,11 +13,8 @@ class Projects::TagsController < Projects::ApplicationController
end end
def create def create
@repository.add_tag(params[:tag_name], params[:ref]) @tag = CreateTagService.new.execute(@project, params[:tag_name],
params[:ref], current_user)
if new_tag = @repository.find_tag(params[:tag_name])
Event.create_ref_event(@project, current_user, new_tag, 'add', 'refs/tags')
end
redirect_to project_tags_path(@project) redirect_to project_tags_path(@project)
end end
......
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