diff options
Diffstat (limited to 'app/services/issuable_links/destroy_service.rb')
-rw-r--r-- | app/services/issuable_links/destroy_service.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/services/issuable_links/destroy_service.rb b/app/services/issuable_links/destroy_service.rb index 57e1314e0da..28035bbb291 100644 --- a/app/services/issuable_links/destroy_service.rb +++ b/app/services/issuable_links/destroy_service.rb @@ -15,14 +15,18 @@ module IssuableLinks return error(not_found_message, 404) unless permission_to_remove_relation? remove_relation - create_notes - track_event + after_destroy success(message: 'Relation was removed') end private + def after_destroy + create_notes + track_event + end + def remove_relation link.destroy! end |