Sha256: 0619eb1415bcc170f7ecf8f3359efd1a973d90158eb259533c74772fd3bef7d7
Contents?: true
Size: 871 Bytes
Versions: 3
Compression:
Stored size: 871 Bytes
Contents
module Shipit module Api class StacksController < BaseController require_permission :read, :stack, only: %i(index show) require_permission :write, :stack, only: %i(create destroy) 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 accepts :merge_queue_enabled, Boolean end def create render_resource Stack.create(params) end def show render_resource stack end def destroy stack.schedule_for_destroy! head :accepted end private def stack @stack ||= stacks.from_param!(params[:id]) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems