Class: Maestrano::Account::GroupsController
- Inherits:
-
Rails::WebHookController
- Object
- Rails::WebHookController
- Maestrano::Account::GroupsController
- Defined in:
- app/controllers/maestrano/account/groups_controller.rb
Instance Method Summary collapse
-
#destroy ⇒ Object
DELETE /maestrano/account/groups/cld-1 DELETE /maestrano/account/groups/cld-1/tenant Delete an entire group.
Instance Method Details
#destroy ⇒ Object
DELETE /maestrano/account/groups/cld-1 DELETE /maestrano/account/groups/cld-1/tenant Delete an entire group
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/maestrano/account/groups_controller.rb', line 6 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 |