Sha256: 8da2f67f26c7687a32bc00e65744fa13adb71241c5d9aa0d2da85305632df75e
Contents?: true
Size: 574 Bytes
Versions: 10
Compression:
Stored size: 574 Bytes
Contents
# frozen_string_literal: true 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
10 entries across 10 versions & 1 rubygems