Skip to content

Commit

Permalink
Remove multiple subscription for an endpoint setting (#2197)
Browse files Browse the repository at this point in the history
  • Loading branch information
jirevwe authored Dec 9, 2024
1 parent 24fd3e8 commit 6a59c3a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
20 changes: 8 additions & 12 deletions database/postgres/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,18 @@ const (

createProjectConfiguration = `
INSERT INTO convoy.project_configurations (
id, search_policy,
max_payload_read_size, replay_attacks_prevention_enabled,
ratelimit_count,
ratelimit_duration, strategy_type,
strategy_duration, strategy_retry_count,
signature_header, signature_versions, disable_endpoint,
meta_events_enabled, meta_events_type, meta_events_event_type,
meta_events_url, meta_events_secret, meta_events_pub_sub,ssl_enforce_secure_endpoints, multiple_endpoint_subscriptions
id, search_policy, max_payload_read_size,
replay_attacks_prevention_enabled, ratelimit_count,
ratelimit_duration, strategy_type, strategy_duration,
strategy_retry_count, signature_header, signature_versions,
disable_endpoint, meta_events_enabled, meta_events_type,
meta_events_event_type, meta_events_url, meta_events_secret,
meta_events_pub_sub, ssl_enforce_secure_endpoints
)
VALUES
(
$1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13,
$14, $15, $16, $17, $18, $19, $20
$14, $15, $16, $17, $18, $19
);
`

Expand All @@ -72,7 +71,6 @@ const (
meta_events_pub_sub = $17,
search_policy = $18,
ssl_enforce_secure_endpoints = $19,
multiple_endpoint_subscriptions = $20,
updated_at = NOW()
WHERE id = $1 AND deleted_at IS NULL;
`
Expand Down Expand Up @@ -272,7 +270,6 @@ func (p *projectRepo) CreateProject(ctx context.Context, project *datastore.Proj
me.Secret,
me.PubSub,
project.Config.SSL.EnforceSecureEndpoints,
project.Config.MultipleEndpointSubscriptions,
)
if err != nil {
return err
Expand Down Expand Up @@ -393,7 +390,6 @@ func (p *projectRepo) UpdateProject(ctx context.Context, project *datastore.Proj
me.PubSub,
project.Config.SearchPolicy,
ssl.EnforceSecureEndpoints,
project.Config.MultipleEndpointSubscriptions,
)
if err != nil {
return fmt.Errorf("update project config err: %v", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,13 @@ <h3 class="font-semibold mb-8px text-12">Allow Only HTTPS Secure Endpoints</h3>
<convoy-toggle name="enforce_secure_endpoints" formControlName="enforce_secure_endpoints" (onChange)="confirmTLSToggleAction($event)"></convoy-toggle>
</div>

<hr class="border-t border-neutral-4 my-24px" />
<hr class="hidden border-t border-neutral-4 my-24px" />

<div class="flex justify-between items-start">
<div class="justify-between items-start hidden">
<div class="max-w-[500px]">
<h3 class="font-semibold mb-8px text-12">Allow endpoint have multiple subscriptions</h3>
<p class="text-12 text-neutral-11 mt-10px w-[460px]">Toggling this will allow an endpoint have multiple subscriptions simultaneously.</p>
</div>

<!-- <convoy-toggle name="enforce_secure_endpoints" formControlName="enforce_secure_endpoints" (onChange)="confirmTLSToggleAction($event)"></convoy-toggle> -->

<convoy-toggle name="multiple_endpoint_subscriptions" formControlName="multiple_endpoint_subscriptions" (onChange)="confirmToggleAction($event, 'multiEndpoints')"></convoy-toggle>
</div>
</ng-container>
Expand Down

0 comments on commit 6a59c3a

Please sign in to comment.