diff options
Diffstat (limited to 'lib/api/services.rb')
-rw-r--r-- | lib/api/services.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/api/services.rb b/lib/api/services.rb index a3b5d2cc4b7..5fd5c6bd9b0 100644 --- a/lib/api/services.rb +++ b/lib/api/services.rb @@ -130,13 +130,11 @@ module API TRIGGER_SERVICES.each do |service_slug, settings| helpers do - # rubocop: disable CodeReuse/ActiveRecord def slash_command_service(project, service_slug, params) - project.services.active.where(template: false).find do |service| + project.services.active.find do |service| service.try(:token) == params[:token] && service.to_param == service_slug.underscore end end - # rubocop: enable CodeReuse/ActiveRecord end params do |