Sha256: 9bbb5009bce2bfa9c93886fe122655a9d02345d260ddc568f24e09126472b7d0
Contents?: true
Size: 622 Bytes
Versions: 15
Compression:
Stored size: 622 Bytes
Contents
class CurrentBrandHandler < BaseHandler def mount @server.mount_proc('/brand/current') do |req, res| begin current_brand = BrandsManager.instance.current_brand if current_brand res.status = 200 res.body = JSON.generate(current_brand) else res.status = 204 # No Content end res.content_type = 'application/json' rescue StandardError => e handle_error(res, e, "Error fetching current brand") end end end end
Version data entries
15 entries across 15 versions & 1 rubygems