Commit 2d4ba2679a3bb2a26adf6c013d5d4be19ed8da94
1 parent
a8f2977c
Exists in
spb-stable
and in
2 other branches
Update tags_controller.rb to use CreateTagService.
Showing
1 changed file
with
2 additions
and
5 deletions
Show diff stats
app/controllers/projects/tags_controller.rb
| @@ -13,11 +13,8 @@ class Projects::TagsController < Projects::ApplicationController | @@ -13,11 +13,8 @@ class Projects::TagsController < Projects::ApplicationController | ||
| 13 | end | 13 | end |
| 14 | 14 | ||
| 15 | def create | 15 | def create |
| 16 | - @repository.add_tag(params[:tag_name], params[:ref]) | ||
| 17 | - | ||
| 18 | - if new_tag = @repository.find_tag(params[:tag_name]) | ||
| 19 | - Event.create_ref_event(@project, current_user, new_tag, 'add', 'refs/tags') | ||
| 20 | - end | 16 | + @tag = CreateTagService.new.execute(@project, params[:tag_name], |
| 17 | + params[:ref], current_user) | ||
| 21 | 18 | ||
| 22 | redirect_to project_tags_path(@project) | 19 | redirect_to project_tags_path(@project) |
| 23 | end | 20 | end |