Sha256: 49677b5443f243dfeec852b85ccf1745cd5dc9acf9bdd8433842518df996b53e

Contents?: true

Size: 672 Bytes

Versions: 2

Compression:

Stored size: 672 Bytes

Contents

class BrandConfigurationsHandler < BaseHandler
    def mount
        @server.mount_proc('/configurations') do |req, res|
            begin
                query = CGI.parse(req.query_string)
                brand_key = query['brand_key']&.first

                response_data = BrandsManager.instance.brand_with_configurations(brand_key)
                res.body = JSON.generate({ success: true, message: "Configurations response", result: response_data })
                res['Content-Type'] = 'application/json'
            rescue StandardError => e
                handle_error(res, e, "Error in brand configurations handler")
            end
        end
    end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solara-0.2.0 solara/lib/core/dashboard/handler/brand_configurations_handler.rb
solara-0.1.0 solara/lib/core/dashboard/handler/brand_configurations_handler.rb