Sha256: 1870f0c71bbde894e42c67e25ae4bd123c609b8040daa5b5022f18aec80b886f

Contents?: true

Size: 414 Bytes

Versions: 7

Compression:

Stored size: 414 Bytes

Contents

# frozen_string_literal: true

require_dependency "decidim/application_controller"

module Decidim
  class StaticMapController < ApplicationController
    skip_authorization_check

    def show
      send_data StaticMapGenerator.new(resource).data, type: "image/jpeg", disposition: "inline"
    end

    private

    def resource
      @resource ||= GlobalID::Locator.locate_signed params[:sgid]
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-core-0.4.2 app/controllers/decidim/static_map_controller.rb
decidim-core-0.4.1 app/controllers/decidim/static_map_controller.rb
decidim-core-0.4.0 app/controllers/decidim/static_map_controller.rb
decidim-core-0.3.2 app/controllers/decidim/static_map_controller.rb
decidim-core-0.3.1 app/controllers/decidim/static_map_controller.rb
decidim-core-0.3.0 app/controllers/decidim/static_map_controller.rb
decidim-core-0.2.0 app/controllers/decidim/static_map_controller.rb