Skip to content

Commit

Permalink
Allow multiple integrations of same type in groups (#87)
Browse files Browse the repository at this point in the history
* use rate limiting for contracts

* improve error handling

* update symfony/yaml

* remove arbitrary limitation of only one integration per type per group

* styleci
  • Loading branch information
recursivetree authored Dec 24, 2023
1 parent 455901a commit 9a33bb4
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/Http/Controllers/GroupsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,6 @@ public function postAddIntegrations(GroupIntegration $request)

// Attach the integrations to the group.
foreach ($request->integrations as $integration_id) {

$integration = Integration::find($integration_id);

// Make sure only one integration type is added.
if ($group->integrations->contains('type', $integration->type))
return redirect()->back()
->with('warning', 'A ' . $integration->type .
' integration already exists. Please choose another type.');

// Add the integration
if (! $group->integrations->contains($integration_id))
$group->integrations()
Expand Down

0 comments on commit 9a33bb4

Please sign in to comment.