Sha256: cb499ef77b319638d44413e930f513eeab6f8dfa19d1cea1ced65d84c25d2a75
Contents?: true
Size: 729 Bytes
Versions: 5
Compression:
Stored size: 729 Bytes
Contents
module Shipit module Api class StacksController < BaseController require_permission :read, :stack, only: %i(index show) require_permission :write, :stack, only: %i(create) def index render_resources stacks end params do requires :repo_owner, String requires :repo_name, String accepts :environment, String accepts :branch, String accepts :deploy_url, String accepts :ignore_ci, Boolean end def create render_resource Stack.create(params) end def show render_resource stack end private def stack @stack ||= stacks.from_param!(params[:id]) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems