Sha256: c7e46d8e1dd713cea9366c01dd1bb0101cabfb3e34357faa8d7f66161bae43bb
Contents?: true
Size: 914 Bytes
Versions: 12
Compression:
Stored size: 914 Bytes
Contents
require 'pact_broker/api/resources/base_resource' require 'pact_broker/api/decorators/dashboard_decorator' require 'pact_broker/api/decorators/dashboard_text_decorator' module PactBroker module Api module Resources class Dashboard < BaseResource def content_types_provided [ ["application/hal+json", :to_json], ["text/plain", :to_text], ] end def allowed_methods ["GET"] end def to_json PactBroker::Api::Decorators::DashboardDecorator.new(index_items).to_json(user_options: decorator_context) end def to_text PactBroker::Api::Decorators::DashboardTextDecorator.new(index_items).to_text(user_options: decorator_context) end private def index_items index_service.find_index_items(tags: true) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems