diff options
Diffstat (limited to 'app/graphql/mutations/custom_emoji/destroy.rb')
-rw-r--r-- | app/graphql/mutations/custom_emoji/destroy.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/graphql/mutations/custom_emoji/destroy.rb b/app/graphql/mutations/custom_emoji/destroy.rb index 863b8152cc7..64e3f2ed7d3 100644 --- a/app/graphql/mutations/custom_emoji/destroy.rb +++ b/app/graphql/mutations/custom_emoji/destroy.rb @@ -17,6 +17,10 @@ module Mutations description: 'Global ID of the custom emoji to destroy.' def resolve(id:) + if Feature.disabled?(:custom_emoji) + raise Gitlab::Graphql::Errors::ResourceNotAvailable, 'Custom emoji feature is disabled' + end + custom_emoji = authorized_find!(id: id) custom_emoji.destroy! |