Sha256: 8d6f57a1fc2bd064c1a09509a977c0b26c3b92dbd6900c2ae967f6389f9fde31
Contents?: true
Size: 558 Bytes
Versions: 22
Compression:
Stored size: 558 Bytes
Contents
require 'uri' module Shipit class CCMenuUrlController < ShipitController def fetch uri = URI(api_stack_ccmenu_url(stack_id: stack.to_param)) uri.query = {'token' => client.authentication_token}.to_query render json: {ccmenu_url: uri.to_s} end private def client @client ||= ApiClient.create_with(permissions: %w(read:stack)) .find_or_create_by!(creator: current_user, name: 'CCMenu Client') end def stack @stack ||= Stack.from_param!(params[:stack_id]) end end end
Version data entries
22 entries across 22 versions & 1 rubygems