Sha256: 6eed085ba76da9aa534b2387bdab4146c6b8bb22a5f85cb81bbd1fbf80830749

Contents?: true

Size: 585 Bytes

Versions: 28

Compression:

Stored size: 585 Bytes

Contents

class Maestrano::Account::GroupsController < Maestrano::Rails::WebHookController
  
  # DELETE /maestrano/account/groups/cld-1
  # DELETE /maestrano/account/groups/cld-1/tenant
  # Delete an entire group
  def destroy
    # id
    group_uid = params[:id]
    
    # Get entity
    organization = Organization.find_by_provider_and_uid_and_tenant('maestrano', group_uid, params[:tenant])
    
    # Delete all relations
    organization.user_company_rels.delete_all
    
    # Delete the organization
    organization.destroy
    
    # Respond
    render json: {success: true}
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
maestrano-connector-rails-0.3.7 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.3.6 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.3.5 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.3.4 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.3.3 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.3.2 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.3.1 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.3.0 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.2.20 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.2.19 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.2.18 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.2.17 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.2.16 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.2.15 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.2.14 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.2.13 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.2.12 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.2.11 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.2.10 app/controllers/maestrano/account/groups_controller.rb
maestrano-connector-rails-0.2.9 app/controllers/maestrano/account/groups_controller.rb