Sha256: 0d2c0f0cfd5e99393fe90bd268ff9207597cc3db7ab89fb552137b97908e11b9
Contents?: true
Size: 706 Bytes
Versions: 7
Compression:
Stored size: 706 Bytes
Contents
module Shipit class ReleaseStatusesController < ShipitController before_action :load_stack before_action :load_deploy def create case params[:status] when 'success' @deploy.report_healthy!(user: current_user) when 'failure' @deploy.report_faulty!(user: current_user) else render status: :unprocessable_entity, json: {message: "Invalid `status` parameter"} end render status: :created, json: @deploy.last_release_status end private def load_deploy @deploy = @stack.deploys_and_rollbacks.find(params[:deploy_id]) end def load_stack @stack ||= Stack.from_param!(params[:stack_id]) end end end
Version data entries
7 entries across 7 versions & 1 rubygems