Sha256: 39213e398dfe7703d2731286b809ace3eb23ad028ae1681c927105e5e6cebfaa

Contents?: true

Size: 541 Bytes

Versions: 18

Compression:

Stored size: 541 Bytes

Contents

class Maestrano::Account::GroupsController < Maestrano::Rails::WebHookController
  # DELETE /maestrano/account/groups/cld-1/tenant
  # Delete an entire group
  def destroy
    # id
    org_uid = params[:id]

    # Get entity
    organization = Maestrano::Connector::Rails::Organization.find_by_uid_and_tenant(org_uid, params[:tenant] || 'default')

    # Delete all relations
    organization.user_organization_rels.delete_all

    # Delete the organization
    organization.destroy

    # Respond
    render json: {success: true}
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
maestrano-connector-rails-2.0.0.pre.RC8 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.5.0 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.0.pre.RC7 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.0.pre.RC6 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.0.pre.RC5 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.0.pre.RC4 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.0.pre.RC3 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.0.pre.RC2 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.0.pre.RC1 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.4.0 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.3.5 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.3.4 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.3.3 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.3.2 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.3.1 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.3.0 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.2.3 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-1.2.2 app/controllers/maestrano/account/groups_controller.rb