Sha256: 726379f4d1269ab10219cfa53bbae23689fa5616496ef134f322ec083ca5d9b0

Contents?: true

Size: 638 Bytes

Versions: 19

Compression:

Stored size: 638 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: org_uid, tenant: params[:tenant] || 'default')

    Maestrano::Connector::Rails::ConnectorLogger.log('info', organization, 'delete organization')

    # Delete all relations
    organization.user_organization_rels.delete_all

    # Delete the organization
    organization.destroy

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

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
maestrano-connector-rails-2.1.2 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.1.1 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.1.0 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.2.pre.RC12 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.2.pre.RC11 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.2.pre.RC10 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.2.pre.RC8 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.2.pre.RC9 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.2.pre.RC7 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.2.pre.RC6 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.2.pre.RC5 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.2.pre.RC4 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.2.pre.RC3 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.2.pre.RC2 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.2.pre.RC1 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.1 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.0 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.0.pre.RC13 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-2.0.0.pre.RC12 app/controllers/maestrano/account/groups_controller.rb