Sha256: b4f441e701aeef5d7bf13143bbe56360eddbc611adbf119f96bc5e8a7ffe8299

Contents?: true

Size: 244 Bytes

Versions: 8

Compression:

Stored size: 244 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Controllers
    class SourcesController < BaseController
      get "/api/sources" do
        sources = Mihari::Alert.distinct.pluck(:source)
        json sources
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mihari-3.9.0 lib/mihari/web/controllers/sources_controller.rb
mihari-3.8.1 lib/mihari/web/controllers/sources_controller.rb
mihari-3.8.0 lib/mihari/web/controllers/sources_controller.rb
mihari-3.7.2 lib/mihari/web/controllers/sources_controller.rb
mihari-3.7.1 lib/mihari/web/controllers/sources_controller.rb
mihari-3.7.0 lib/mihari/web/controllers/sources_controller.rb
mihari-3.6.1 lib/mihari/web/controllers/sources_controller.rb
mihari-3.6.0 lib/mihari/web/controllers/sources_controller.rb