Sha256: f14bab80a8399cb07a72b38cd7ae20418691a0f15274018d669866968f7955ac
Contents?: true
Size: 820 Bytes
Versions: 5
Compression:
Stored size: 820 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') unless organization Maestrano::Connector::Rails::ConnectorLogger.log('info', nil, 'Organization not found') return render json: {success: true}, status: 204 end 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
5 entries across 5 versions & 1 rubygems