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